.pyc crashes, .py doesn't
Michael Hudson
mwh at python.net
Tue May 8 17:53:14 EDT 2001
cbrand at operamail.com writes:
> The application runs just fine if I change the source file
> (whizdb.py) or delete the bytecode file (whizdb.pyc), but crashes
> with an invalid page fault in MSVCRT.DLL (MS VC++ runtime, I think)
> if whizdb.pyc is accessed for the import.
Wierd! Can you get a backtrace? Can you at least tell if it crashes
on import or later, when the app is running?
> I expect there is a problem in my code that is causing this, but, as
> a work-around, is there a way to force Python to import from the
> source file (.py) instead of the bytecode file? Is there a way to
> prevent Python from writing the pyc file when importing in the first
> place?
Write protecting the directory the .py files are in? Stopping the
crashes sounds the best bet to me, though.
Cheers,
M.
--
42. You can measure a programmer's perspective by noting his
attitude on the continuing vitality of FORTRAN.
-- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html
More information about the Python-list
mailing list