Debugging / profiling subscripts

Andrea Crotti andrea.crotti.0 at gmail.com
Tue Jan 31 06:33:56 EST 2012


If for example I have a Python script which for some reasons needs to
run another Python script as a subprocess, is there a way to debug /
profile it?

If I add an
import pdb; pdb.set_trace()

In my specific case I am running a program that, under certain
conditions, has to restart from scratch, doing something like

cmd = ["python"] + sys.argv
Popen(cmd, shell=True)

but the subprocess becomes than a black box..




More information about the Python-list mailing list