On Aug 21, 10:47 am, Bjoern Schliessmann <usenet-
[EMAIL PROTECTED]> wrote:
> Ant wrote:
...
> | print os.path.split(sys.argv[0])[0]
>
> $ cd tmp
> ~/tmp$ ../test.py
> ..
> ~/tmp$
>
> That's rather not what's intended. I'd try os.path.abspath(__file__)
> instead.

Fair point. On Win32 sys.argv[0] always seems to give the full path
rather than the relative path - hadn't realised it was different for
linux (?).

--
Ant...

http://antroy.blogspot.com/


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to