Utilities/BackgroundClient.py

changeset 3591
2f2a4a76dd22
parent 3540
b83fe0651bfd
child 3741
b65577e5c8c6
equal deleted inserted replaced
3590:5280e37405b8 3591:2f2a4a76dd22
41 ver = b'Python2' if sys.version_info[0] == 2 else b'Python3' 41 ver = b'Python2' if sys.version_info[0] == 2 else b'Python3'
42 self.connection.sendall(ver) 42 self.connection.sendall(ver)
43 43
44 def __initClientService(self, fn, path, module): 44 def __initClientService(self, fn, path, module):
45 """ 45 """
46 Import the given module and register it as service. 46 Private method to import the given module and register it as service.
47 47
48 @param fn service name to register (str) 48 @param fn service name to register (str)
49 @param path contains the path to the module (str) 49 @param path contains the path to the module (str)
50 @param module name to import (str) 50 @param module name to import (str)
51 @return text result of the import action (str) 51 @return text result of the import action (str)
89 data += newData 89 data += newData
90 return data 90 return data
91 91
92 def run(self): 92 def run(self):
93 """ 93 """
94 Implement the main loop of the client. 94 Public method implementing the main loop of the client.
95 """ 95 """
96 try: 96 try:
97 while True: 97 while True:
98 header = self.__receive(8) 98 header = self.__receive(8)
99 # Leave main loop if connection was closed. 99 # Leave main loop if connection was closed.

eric ide

mercurial