diff -r 9554952d36d7 -r 6923074540dd Beremiz_service.py --- a/Beremiz_service.py Wed Oct 03 15:47:59 2018 +0300 +++ b/Beremiz_service.py Thu Oct 04 11:25:42 2018 +0300 @@ -32,7 +32,7 @@ import threading from threading import Thread, Semaphore, Lock import traceback -import __builtin__ +from six.moves import builtins import Pyro import Pyro.core as pyro @@ -143,7 +143,7 @@ argv = [WorkingDir] if __name__ == '__main__': - __builtin__.__dict__['_'] = lambda x: x + builtins.__dict__['_'] = lambda x: x # TODO: add a cmdline parameter if Trying Preloading Xenomai makes problem TryPreloadXenomai() version() @@ -162,12 +162,12 @@ domain = "Beremiz" # Define locale for wx - loc = __builtin__.__dict__.get('loc', None) + loc = builtins.__dict__.get('loc', None) if loc is None: wx.LogGui.EnableLogging(False) loc = wx.Locale(langid) wx.LogGui.EnableLogging(True) - __builtin__.__dict__['loc'] = loc + builtins.__dict__['loc'] = loc # Define location for searching translation files loc.AddCatalogLookupPathPrefix(localedir) # Define locale domain @@ -186,8 +186,8 @@ return wx.GetTranslation(message).encode(default_locale) if __name__ == '__main__': - __builtin__.__dict__['_'] = unicode_translation - # __builtin__.__dict__['_'] = wx.GetTranslation + builtins.__dict__['_'] = unicode_translation + # builtins.__dict__['_'] = wx.GetTranslation # Life is hard... have a candy.