Try this: >>> import os >>> os.getcwd() 'C:\\Python24' I ran it from the interpreter. Dunno what it does from a script in an arbitrary location. YMMV. Cheers, Cliff