[Tutor] getting 'pwd' for XP ?

Shantanoo Mahajan shantanoo at gmail.com
Thu Sep 28 17:42:42 CEST 2006


+++ Dave S [28-09-06 16:10 +0100]:
| I currently running XP (like a fish out of water :) and I need to know the dir 
| that the python script is executed from. a linux 'pwd' How can I achieve 
| this - I have looked in sys & os & os.path but found nothing suitable

====================
Python 2.4.3 (#2, Sep 26 2006, 15:27:42)
[GCC 3.4.4 [FreeBSD] 20050518] on freebsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/tmp'
>>>  
====================

-- 
An idea that is not dangerous is unworthy to be called an idea at all.
~Elbert Hubbard


More information about the Tutor mailing list