eric6/Utilities/BackgroundClient.py

branch
maintenance
changeset 8400
b3eefd7e58d1
parent 8273
698ae46f40a4
parent 8307
01a323d3d4d7
equal deleted inserted replaced
8274:197414ba11cc 8400:b3eefd7e58d1
215 time.sleep(0.5) 215 time.sleep(0.5)
216 self.connection.shutdown(socket.SHUT_RDWR) 216 self.connection.shutdown(socket.SHUT_RDWR)
217 self.connection.close() 217 self.connection.close()
218 218
219 if __name__ == '__main__': 219 if __name__ == '__main__':
220 if len(sys.argv) != 4: 220 if len(sys.argv) != 5:
221 print('Host, port and max. processes parameters are missing.' 221 print('Host, port, max. processes and Python library path parameters'
222 ' Aborting.') 222 ' are missing. Aborting...')
223 sys.exit(1) 223 sys.exit(1)
224 224
225 host, port, maxProcs = sys.argv[1:] 225 host, port, maxProcs, pyLibraryPath = sys.argv[1:]
226
227 # insert pyLibraryPath into the search path because external stuff might
228 # be installed in the eric (virtual) environment
229 sys.path.insert(1, pyLibraryPath)
230
226 backgroundClient = BackgroundClient(host, int(port), int(maxProcs)) 231 backgroundClient = BackgroundClient(host, int(port), int(maxProcs))
227 # Start the main loop 232 # Start the main loop
228 backgroundClient.run() 233 backgroundClient.run()
229 234
230 # 235 #

eric ide

mercurial