.pyo's without .pyc's?

Randall Hopper aa8vb at yahoo.com
Thu May 27 07:14:17 EDT 1999


Randall Hopper:
 |Trying to run a python script with -O fails on other modules (os for
 |example).

To be more clear, I should have said:

     Python-1.5.2 > find . -name 'exc*' -print
          ./lib/python1.5/exceptions.pyo
          ./lib/python1.5/exceptions.pyc

     Python-1.5.2 > python -O
          Python 1.5.2 (#2, May 26 1999, 12:25:54) [C] on irix646-n32
          Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
          >>> ^D

     Python-1.5.2 > find . -name '*.pyc' | xargs rm

     Python-1.5.2 > python -O
          ...
          'import exceptions' failed; use -v for traceback     <---------------
          Warning!  Falling back to string-based exceptions    <---------------


So it appears that .pyc's are being used even with running in optimized
mode.

Randall




More information about the Python-list mailing list