On 21 Aug, 11:27, Ant <[EMAIL PROTECTED]> wrote: > On Aug 21, 10:10 am, [EMAIL PROTECTED] wrote: > ... > > > myLocation = GetMyLocation() > > print myLocation > > > >> C:/folder > > Do you mean the folder containing the script? Or the current working > directory? > > If the former, then look at os.path.split(sys.argv[0])[0] > If the latter, try something like: os.path.abspath(os.curdir) > > -- > Ant... > > http://antroy.blogspot.com/
The following code - import os import sys print os.getcwd() + "." print os.path.split(sys.argv[0])[0] + "." gives me - C:\Documents and Settings\me\Desktop. . Im running Python 2.2 on NT -- http://mail.python.org/mailman/listinfo/python-list