path to python file given module
Kartic
kartic.krishnamurthy at gmail.com
Sun Jan 9 20:10:04 EST 2005
More information about the Python-list mailing list
Sun Jan 9 20:10:04 EST 2005
- Previous message (by thread): path to python file given module
- Next message (by thread): a new Perl/Python a day
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That is because your module in not in a standard location that python can find it in. It is not that inspect.getsourcefile() is not working. Actually if you try reloading your filegen module after the os.chdir(), you will see that import fails. If you copy your filegen directory to the site-packages directory of python, you will get the complete path of the module no matter where you are inside your script.
- Previous message (by thread): path to python file given module
- Next message (by thread): a new Perl/Python a day
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list