debugging - How to debug into subprocess.call() in Python? -


i trying understand project's source code these days. run project, line line, works fine until line:

res = subprocess.call(command, env=os.environ) 

i checked variable "command" , realized function throw command python script , try execute in subprocess. jumped out of eclipse, , tried execute command through terminal while under same directory.

now got:

traceback (most recent call last):   file "/home/elderry/projects/git/tahoe-lafs/support/bin/tahoe", line 6, in <module>     pkg_resources import load_entry_point   file "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2850, in <module>     working_set.require(__requires__)   file "/usr/lib/python2.7/site-packages/pkg_resources.py", line 696, in require     needed = self.resolve(parse_requirements(requirements))   file "/usr/lib/python2.7/site-packages/pkg_resources.py", line 594, in resolve     raise distributionnotfound(req) pkg_resources.distributionnotfound: allmydata-tahoe==1.10.0.post27 

then lost direction, did subprocess continue run? why did script work in program not in terminal? since script included in project, hope set break points in in eclipse, didn't catch anything. there way debug subprocess, not dive code of subprocess module's code itself?

i guess main project alters pythonpah (sys.path). in os.environ of project , try run second script environment.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -