Error with co_filename when loading modules from zip file

Bob Rossi bob at brasko.net
Tue Mar 6 08:41:32 EST 2012


On Tue, Mar 06, 2012 at 02:38:50AM -0800, Vinay Sajip wrote:
> On Mar 6, 2:40 am, Bob Rossi <b... at brasko.net> wrote:
> 
> > Darn it, this was reported in 2007
> >  http://bugs.python.org/issue1180193
> > and it was mentioned the logging package was effected.
> >
> > Yikes.
> >
> 
> I will think about this, but don't expect any quick resolution :-( I
> think the right fix would be not in the logging package, but in the
> module loading machinery (as mentioned on that issue).
> 
> I wouldn't worry about the performance aspect - once the logging
> package is loaded, there's no performance impact. That's a tiny one-
> off hit which you will probably not notice at all.

OK.

Do you know where the bytecode gets stored when you load a py
file from a zip?

My program can potentially run for hours, from an embedded context,
and could call into the logger and other py files over and over.

Are the bytecode files stored in RAM one time, or recomputed each
time they are needed?

Thanks,
Bob



More information about the Python-list mailing list