Find directory name of file?

gene tani gene.tani at gmail.com
Mon Jan 30 16:39:39 CET 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