On 10/15/07, Yosi Scharf <syosi@mit.edu> wrote: > Your shell was telling you that you were in /tmp. However, cwm > had no way to know that It could use either or both of the following two methods: >>> import os >>> print os.environ.get('PWD') /tmp >>> import subprocess >>> print subprocess.Popen(['pwd'], stdout=subprocess.PIPE, shell=True).communicate()[0] /tmp And of course should either of these fail then you can rely on os.getcwd() and so on. Thanks, -- Sean B. Palmer, http://inamidst.com/sbp/Received on Monday, 29 October 2007 21:31:13 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:59 GMT