.pyo's without .pyc's?

M.-A. Lemburg mal at lemburg.com
Thu May 27 18:38:53 EDT 1999


Randall Hopper wrote:
> 
> --- "M.-A. Lemburg" <mal at lemburg.com> wrote:
> > Randall Hopper wrote:
> > >
> > > I'm trying to cook a minimalist Python install,
> > > and I find that python -O won't run without .pyc's
> > > in-place, even when there are pyo's.
> >
> > Looks like you have setup PYTHONPATH to point to
> > some old extensions.py file (the compiled versions >
> > seemed to be ok).
> 
> I'd reset PYTHONPATH.
> 
> > Try "python -vv" to have a look at the path scanning
> > Python does on startup.
> 
> Thanks, that turned out to be very useful.  Here's a
> unified diff of what's different between a "python -O"
> startup with and without .pyc's.  In this specific
> case, it appears it's not even going to look for a
> .pyo for the exceptions module:
> 
> --- OUT.normal  Thu May 27 07:20:43 1999
> +++ OUT.nopyc   Thu May 27 07:20:59 1999
> @@ -2,7 +2,21 @@
>  # trying .../lib/python1.5/exceptionsmodule.so
>  # trying .../lib/python1.5/exceptions.py
>  # trying .../lib/python1.5/exceptions.pyc

One of the above two lines should always work. My guess
it that you have either removed these files by accident
or that permissions on the files are wrong.

> -import exceptions # precompiled from
>  .../lib/python1.5/exceptions.pyc

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                   218 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/





More information about the Python-list mailing list