Strings vs. Bytes
authorBen McGinnes <ben@adversary.org>
Sat, 16 May 2015 18:43:53 +0000 (04:43 +1000)
committerBen McGinnes <ben@adversary.org>
Sat, 16 May 2015 18:43:53 +0000 (04:43 +1000)
* CLI input must be byte encoded.

lang/py3-pyme/examples/inter-edit.py

index 088b292..f97232b 100644 (file)
@@ -48,7 +48,7 @@ if len(sys.argv) != 2:
 else:
     c = Context()
     out = Data()
-    c.op_keylist_start(sys.argv[1], 0)
+    c.op_keylist_start(sys.argv[1].encode('utf-8'), 0)
     key = c.op_keylist_next()
     helper = {"skip": 0, "data": out}
     c.op_edit(key, edit_fnc, helper, out)