I have had trouble with the __file__ attribute in the past, when using py2exe (i.e. on the windows platform) and using the bundle feature (which zips all files). Using os.path.realpath( __file__ ) resolves to something like .../ library.zip/packageName/fileName Then when trying to perform an open on a file, say .../library.zip/ packageName/supportingPackageName, the file can not be found. -- http://mail.python.org/mailman/listinfo/python-list
- How to read file during module import? Jeremy
- Re: How to read file during module import? Gabriel Genellina
- Re: How to read file during module import? Jeremy
- Re: How to read file during module import? Gabriel Genellina
- Re: How to read file during module import? Dave Angel
- Re: How to read file during module import? HigStar
- Re: How to read file during module import? Gabriel Genellina
- Re: How to read file during module import? HigStar
- Re: How to read file during module import? Gabriel Genellina