Re: How to read file during module import?

2010-04-18 Thread HigStar
On Apr 13, 4:03 am, "Gabriel Genellina" wrote: > En Sun, 11 Apr 2010 19:43:03 -0300,HigStar escribió: > > > 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 > >

Re: How to read file during module import?

2010-04-11 Thread HigStar
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 o