Is there a way to step debug the multiprocessing python program?
castironpi at gmail.com
Sat Nov 8 04:28:42 CET 2008
On Nov 7, 9:15 pm, "davy zhang" <davyzh... at gmail.com> wrote:
> I mean every process attach like thread in wingide
> like thread or tasklet in wingide
> maybe I asked toooo much:D
Here is where 'multiprocessing' assembles the command line to spawn
the subprocess (Windows version):
if getattr(sys, 'frozen', False):
return [sys.executable, '--multiprocessing-fork']
prog = 'from multiprocessing.forking import main; main()'
return [_python_exe, '-c', prog, '--multiprocessing-fork']
It's in multiprocessing/forking.py. As you see, 'main()' is run in
the separate process first thing, which calls self._bootstrap().
Perhaps you can muck around with that and hook it into your IDE
somehow. Even using pdb, which is just a module in Python itself, was
a bit tricky. Let is know what you learn.
More information about the Python-list