eric6/DebugClients/Python/DebugClientBase.py

branch
multi_processing
changeset 7390
052ce4cf06c6
parent 7377
cc920e534ac0
child 7392
b6674724612a
equal deleted inserted replaced
7389:770ffcb88be5 7390:052ce4cf06c6
1316 remoteAddress = remoteAddress.split("@@i")[0] 1316 remoteAddress = remoteAddress.split("@@i")[0]
1317 sock = socket.create_connection((remoteAddress, port)) 1317 sock = socket.create_connection((remoteAddress, port))
1318 1318
1319 self.__debuggerId = "{0}-{1}".format(socket.gethostname(), os.getpid()) 1319 self.__debuggerId = "{0}-{1}".format(socket.gethostname(), os.getpid())
1320 1320
1321 self.readstream = AsyncFile(sock, sys.stdin.mode, sys.stdin.name) 1321 name = sys.stdin.name
1322 # Special case if in a multiprocessing.Process
1323 if isinstance(name, int):
1324 name = '<stdin>'
1325
1326 self.readstream = AsyncFile(sock, sys.stdin.mode, name)
1322 self.writestream = AsyncFile(sock, sys.stdout.mode, sys.stdout.name) 1327 self.writestream = AsyncFile(sock, sys.stdout.mode, sys.stdout.name)
1323 self.errorstream = AsyncFile(sock, sys.stderr.mode, sys.stderr.name) 1328 self.errorstream = AsyncFile(sock, sys.stderr.mode, sys.stderr.name)
1324 1329
1325 if redirect: 1330 if redirect:
1326 sys.stdin = self.readstream 1331 sys.stdin = self.readstream
2007 @param tracePython flag to enable tracing into the Python library 2012 @param tracePython flag to enable tracing into the Python library
2008 (boolean) 2013 (boolean)
2009 @param redirect flag indicating redirection of stdin, stdout and 2014 @param redirect flag indicating redirection of stdin, stdout and
2010 stderr (boolean) 2015 stderr (boolean)
2011 """ 2016 """
2012 global debugClient
2013 if host is None: 2017 if host is None:
2014 host = os.getenv('ERICHOST', 'localhost') 2018 host = os.getenv('ERICHOST', 'localhost')
2015 if port is None: 2019 if port is None:
2016 port = os.getenv('ERICPORT', 42424) 2020 port = os.getenv('ERICPORT', 42424)
2017 2021

eric ide

mercurial