LPCManager.py
changeset 22 45982ef9370b
parent 21 06e42e229dd6
child 23 41616a8c80a7
equal deleted inserted replaced
21:06e42e229dd6 22:45982ef9370b
    53 wx.InitAllImageHandlers()
    53 wx.InitAllImageHandlers()
    54 
    54 
    55 _base_folder = os.path.split(sys.path[0])[0]
    55 _base_folder = os.path.split(sys.path[0])[0]
    56 sys.path.append(os.path.join(_base_folder, "beremiz"))
    56 sys.path.append(os.path.join(_base_folder, "beremiz"))
    57 
    57 
    58 from util.TranslationCatalogs import AddCatalog, locale
    58 from util.TranslationCatalogs import AddCatalog
    59 AddCatalog(os.path.join(CWD, "locale"))
    59 AddCatalog(os.path.join(CWD, "locale"))
    60 
    60 
    61 if __name__ == '__main__':
    61 if __name__ == '__main__':
    62     # Import module for internationalization
    62     # Import module for internationalization
    63     import gettext
    63     import gettext
    64     
    64     
    65     __builtin__.__dict__['loc'] = locale
    65     #__builtin__.__dict__['_'] = wx.GetTranslation
    66     __builtin__.__dict__['_'] = wx.GetTranslation
    66     __builtin__.__dict__['_'] = lambda x: x
    67 
    67 
    68 _base_path = os.path.split(__file__)[0]
    68 _base_path = os.path.split(__file__)[0]
    69 import features
    69 import features
    70 from POULibrary import POULibrary
    70 from POULibrary import POULibrary
    71 
    71 
  1812             self.Buffer += self.socket.recv(2048)
  1812             self.Buffer += self.socket.recv(2048)
  1813             idx = self.Buffer.find("\n")
  1813             idx = self.Buffer.find("\n")
  1814         if idx != -1:
  1814         if idx != -1:
  1815             line = self.Buffer[:idx+1]
  1815             line = self.Buffer[:idx+1]
  1816             self.Buffer = self.Buffer[idx+1:]
  1816             self.Buffer = self.Buffer[idx+1:]
  1817             if BMZ_DBG:
  1817             if True:#BMZ_DBG:
  1818                 print "command >"+line
  1818                 print "command >"+line+str(len(line))
  1819             return line
  1819             return line
  1820         return ""
  1820         return ""
  1821     
  1821     
  1822     """ Base class for file like objects to facilitate StdOut for the Shell."""
  1822     """ Base class for file like objects to facilitate StdOut for the Shell."""
  1823     def write(self, s, style = None):
  1823     def write(self, s, style = None):