py_ext/PythonFileCTNMixin.py
changeset 1103 2fc1eef45bda
parent 1097 233681f2a00e
child 1113 16e5b6abd91c
--- a/py_ext/PythonFileCTNMixin.py	Thu May 09 09:00:24 2013 +0200
+++ b/py_ext/PythonFileCTNMixin.py	Thu May 09 10:56:40 2013 +0200
@@ -53,9 +53,14 @@
         
         # Adding variables
         text += "## User variables reference\n"
+        config = self.GetCTRoot().GetProjectConfigNames()[0]
         for variable in self.CodeFile.variables.variable:
-            text += "%s = %s\n" % (variable.getname(),
-                                   str(variable.getinitial()))
+            global_name = "%s_%s" % (config.upper(), variable.getname().upper())
+            text += "# global_var:%s python_var:%s type:%s initial:%s\n" % (
+                global_name,
+                variable.getname(),
+                variable.gettype(),
+                str(variable.getinitial()))
         text += "\n"
         
         # Adding user global variables and routines