[tahoe-dev] How to track after subprocess.call()?

Steven Lee elderry at outlook.com
Thu Jul 18 09:30:53 UTC 2013

I am trying to understand Tahoe's source code these days, I built it under Arch Linux with Eclipse and PyDev, then set a test grid, everything works well. Then I'd like to execute this command:tahoe -d . cp e1 tahoe:I have tested this command in Terminal and it run well, so I entered the Debug mode in Eclipse and try to follow it line by line, however, when it comes to line 119 of $BASE/bin/tahoe:res = subprocess.call(command, env=os.environ)I checked the variable "command" and realized that this function just throw my command above to script: $BASE/support/bin/tahoe and try to execute it in a subprocess. So I jumped out of Eclipse, and tried to execute the command through Terminal while under the same directory:$BASE/support/bin/tahoe -d . cp e1 tahoe:
Now this is what I got:Traceback (most recent call last):  File "/home/elderry/Projects/git/tahoe-lafs/support/bin/tahoe", line 6, in <module>    from 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 I completely lost my direction, where does the subprocess continue to run? I viewed $BASE/support/bin/tahoe and found it's so short, which confused me more. With some hope I set some break points in it in Eclipse, which didn't catch anything.
Anyone can help? Thanks anyway. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tahoe-lafs.org/pipermail/tahoe-dev/attachments/20130718/771def6f/attachment-0001.html>

More information about the tahoe-dev mailing list