[Tutor] getting 'pwd' for XP ?

Dave S pythontut at pusspaws.net
Thu Sep 28 19:58:06 CEST 2006


On Thursday 28 September 2006 16:42, Shantanoo Mahajan wrote:
> +++ 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'
>
> ====================

os.getcwd() it is - must have missed it - thanks

Dave


More information about the Tutor mailing list