W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > October 2007

Re: CWM Bug: --base broken on stdin

From: Sean B. Palmer <sean@miscoranda.com>
Date: Mon, 29 Oct 2007 21:30:52 +0000
Message-ID: <b6bb4d890710291430w4685815flbef1e19666bda04f@mail.gmail.com>
To: "Yosi Scharf" <syosi@mit.edu>
Cc: public-cwm-bugs@w3.org

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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:01 UTC