Message266026
In this code, one would expect that the entire traceback from the uncaught recursion error would get put onto the queue, where it could be read in the main process.
queue = multiprocessing.Queue()
def do_stderr(queue):
class f:
def write(self, data):
queue.put(data)
def flush(self):
pass
import sys
sys.stderr = f()
def g():
g()
g()
multiprocessing.Process(target=do_stderr,args=(queue,)).start()
However, only some of the output actually gets enqueued:
Process IdleProcess-6:
Traceback (most recent call last):
File "C:\Python34\lib\multiprocessing\process.py", line 254, in _bootstrap
self.run()
File "C:\Python34\lib\multiprocessing\process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "<pyshell#446>", line 12, in do_stderr
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
File "<pyshell#446>", line 11, in g
The rest of the data is not accessible. |
|
Date |
User |
Action |
Args |
2016-05-21 21:04:33 | ppperry | set | recipients:
+ ppperry |
2016-05-21 21:04:33 | ppperry | set | messageid: <1463864673.26.0.0758761622573.issue27081@psf.upfronthosting.co.za> |
2016-05-21 21:04:33 | ppperry | link | issue27081 messages |
2016-05-21 21:04:33 | ppperry | create | |
|