diff configmix/compat.py @ 320:98490375d90c

Allow variable name quoting to be used in .getvar() and .getvar_s() and references
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 06 May 2021 09:45:51 +0200
parents eed16a1ec8f3
children 396d8d9aaead
line wrap: on
line diff
--- a/configmix/compat.py	Wed May 05 23:12:01 2021 +0200
+++ b/configmix/compat.py	Thu May 06 09:45:51 2021 +0200
@@ -14,7 +14,8 @@
            "text_to_native_os_str",
            "native_os_str_to_text",
            "u",
-           "u2fs"]
+           "u2fs",
+           "uchr"]
 
 
 import sys
@@ -67,6 +68,9 @@
             return s
         return s.encode(_FS_ENCODING)
 
+    def uchr(n):
+        return unichr(n)
+
 else:
 
     def text_to_native_os_str(s, encoding=None):
@@ -96,3 +100,6 @@
         """
         assert isinstance(s, str)
         return s
+
+    def uchr(n):
+        return chr(n)