summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python/pmt/pmt_to_python.py
diff options
context:
space:
mode:
authorSylvain Munaut <246tnt@gmail.com>2013-12-19 19:29:01 -0500
committerTom Rondeau <tom@trondeau.com>2013-12-19 19:29:01 -0500
commit5a0fa88289982428557150af5b2a98f076247197 (patch)
tree13d34c4a04b6f6a0ea522afcd572bf32cf83590a /gnuradio-runtime/python/pmt/pmt_to_python.py
parent37fcb46ff02459d6d00368745e579c1d4b1f5f65 (diff)
pmt: adds ability to handle unicode input with pmt_to_python.
Diffstat (limited to 'gnuradio-runtime/python/pmt/pmt_to_python.py')
-rw-r--r--gnuradio-runtime/python/pmt/pmt_to_python.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/pmt/pmt_to_python.py b/gnuradio-runtime/python/pmt/pmt_to_python.py
index e551f4e983..e4797f9d44 100644
--- a/gnuradio-runtime/python/pmt/pmt_to_python.py
+++ b/gnuradio-runtime/python/pmt/pmt_to_python.py
@@ -73,6 +73,7 @@ THE_TABLE = ( #python type, check pmt type, to python, from python
(None, pmt.is_null, lambda x: None, lambda x: pmt.PMT_NIL),
(bool, pmt.is_bool, pmt.to_bool, pmt.from_bool),
(str, pmt.is_symbol, pmt.symbol_to_string, pmt.string_to_symbol),
+ (unicode, lambda x: False, None, lambda x: pmt.string_to_symbol(x.encode('utf-8'))),
(int, pmt.is_integer, pmt.to_long, pmt.from_long),
(long, pmt.is_uint64, lambda x: long(pmt.to_uint64(x)), pmt.from_uint64),
(float, pmt.is_real, pmt.to_double, pmt.from_double),