Find directory name of file?

gene tani gene.tani at
Mon Jan 30 10:39:39 EST 2006

ngw wrote:

> Try os.path.dirname (__file__)

what O/S and python release are you using?  I get NameError: '__file__'
not defined  in win32 and OS X (both are 2.4.x, installed from
ActiveState installers)

More information about the Python-list mailing list