]> git.lyx.org Git - features.git/blobdiff - lib/lyx2lyx/lyx_1_6.py
Some python 3 fixes for lyx2lyx
[features.git] / lib / lyx2lyx / lyx_1_6.py
index 2f8ebd24b8a6ae9664902d786a0e2eda3a3e8432..f431d5fec162dc38bfe086e68e458e444b1ccccd 100644 (file)
@@ -24,6 +24,16 @@ import sys, os
 
 from parser_tools import find_token, find_end_of, find_tokens, get_value
 
+# Provide support for both python 2 and 3
+PY2 = sys.version_info[0] == 2
+if not PY2:
+    text_type = str
+    unichr = chr
+else:
+    text_type = unicode
+    unichr = unichr
+# End of code to support for both python 2 and 3
+
 ####################################################################
 # Private helper functions