Fixed runtime problems with python 2.6 without wx installed
authorEdouard Tisserant
Tue, 22 May 2012 06:11:37 +0200
changeset 742 41a4a560406c
parent 741 382b2c848dac
child 744 bdab45f96aa0
Fixed runtime problems with python 2.6 without wx installed
ConfTreeNodeEditor.py
ConfigTreeNode.py
ProjectController.py
c_ext/CFileEditor.py
c_ext/c_ext.py
py_ext/py_ext.py
targets/__init__.py
util/__init__.py
--- a/ConfTreeNodeEditor.py	Mon May 21 17:53:50 2012 +0200
+++ b/ConfTreeNodeEditor.py	Tue May 22 06:11:37 2012 +0200
@@ -9,7 +9,7 @@
 
 from PLCOpenEditor import TITLE, FILEMENU, PROJECTTREE, PAGETITLES
 
-from util import opjimg
+from util.misc import opjimg
 from util.TextCtrlAutoComplete import TextCtrlAutoComplete
 from util.BrowseValuesLibraryDialog import BrowseValuesLibraryDialog
 
--- a/ConfigTreeNode.py	Mon May 21 17:53:50 2012 +0200
+++ b/ConfigTreeNode.py	Tue May 22 06:11:37 2012 +0200
@@ -12,7 +12,7 @@
 from xml.dom import minidom
 
 from xmlclass import GenerateClassesFromXSDstring
-from util import GetClassImporter
+from util.misc import GetClassImporter
 
 from PLCControler import PLCControler, LOCATION_CONFNODE
 
--- a/ProjectController.py	Mon May 21 17:53:50 2012 +0200
+++ b/ProjectController.py	Tue May 22 06:11:37 2012 +0200
@@ -14,7 +14,8 @@
 
 import targets
 import connectors
-from util import MiniTextControler, opjimg, CheckPathPerm, GetClassImporter
+from util.misc import opjimg, CheckPathPerm, GetClassImporter
+from util.MiniTextControler import MiniTextControler
 from util.ProcessLogger import ProcessLogger
 from PLCControler import PLCControler
 from PLCOpenEditor import CWD
@@ -942,7 +943,7 @@
             return IEC_code_viewer
         
         elif name == "IEC raw code":
-            controler = MiniTextControler.MiniTextControler(self._getIECrawcodepath())
+            controler = MiniTextControler(self._getIECrawcodepath())
             IEC_raw_code_viewer = TextViewer(self.AppFrame.TabsOpened, "", None, controler, instancepath=name)
             #IEC_raw_code_viewer.Enable(False)
             IEC_raw_code_viewer.SetTextSyntax("ALL")
--- a/c_ext/CFileEditor.py	Mon May 21 17:53:50 2012 +0200
+++ b/c_ext/CFileEditor.py	Tue May 22 06:11:37 2012 +0200
@@ -4,7 +4,7 @@
 import wx.grid
 import wx.stc as stc
 import wx.lib.buttons
-from util import opjimg
+from util.misc import opjimg
 
 from controls import CustomGrid, CustomTable
 from ConfTreeNodeEditor import ConfTreeNodeEditor
--- a/c_ext/c_ext.py	Mon May 21 17:53:50 2012 +0200
+++ b/c_ext/c_ext.py	Tue May 22 06:11:37 2012 +0200
@@ -4,7 +4,7 @@
 
 from xmlclass import *
 
-from util import opjimg
+from util.misc import opjimg
 from CFileEditor import CFileEditor
 from PLCControler import UndoBuffer, LOCATION_CONFNODE, LOCATION_VAR_INPUT, LOCATION_VAR_OUTPUT 
 
--- a/py_ext/py_ext.py	Mon May 21 17:53:50 2012 +0200
+++ b/py_ext/py_ext.py	Tue May 22 06:11:37 2012 +0200
@@ -1,7 +1,7 @@
 import os
 from POULibrary import POULibrary
 from PythonFileCTNMixin import PythonFileCTNMixin
-from util import opjimg
+from util.misc import opjimg
 
 class PythonLibrary(POULibrary):
     def GetLibraryPath(self):
--- a/targets/__init__.py	Mon May 21 17:53:50 2012 +0200
+++ b/targets/__init__.py	Tue May 22 06:11:37 2012 +0200
@@ -36,12 +36,12 @@
 def _GetLocalTargetClassFactory(name):
     return lambda:getattr(__import__(name,globals(),locals()), name+"_target")
 
-targets = {name: {"xsd":path.join(_base_path, name, "XSD"), 
+targets = dict([(name, {"xsd":path.join(_base_path, name, "XSD"), 
                   "class":_GetLocalTargetClassFactory(name),
-                  "code": path.join(path.split(__file__)[0],name,"plc_%s_main.c"%name)}
+                  "code": path.join(path.split(__file__)[0],name,"plc_%s_main.c"%name)})
                 for name in listdir(_base_path) 
                     if path.isdir(path.join(_base_path, name)) 
-                       and not name.startswith("__")}
+                       and not name.startswith("__")])
 
 toolchains = {"gcc":  path.join(_base_path, "XSD_toolchain_gcc")}
 
--- a/util/__init__.py	Mon May 21 17:53:50 2012 +0200
+++ b/util/__init__.py	Tue May 22 06:11:37 2012 +0200
@@ -1,8 +0,0 @@
-import TextCtrlAutoComplete
-import BrowseValuesLibraryDialog
-import ProcessLogger
-import Zeroconf
-import discovery
-import MiniTextControler
-from misc import *
-