David Hancock

Sep 30

Python startup switch

There’s a nice “-v” startup switch for the Python compiler that I learned the importance of today. We were unable to import a particular module, and the -v switch showed errors like:

 # blahblah/FPXMLBuilder.pyc matches blahblah/FPXMLBuilder.py
 Fatal Python error: PyString_InternInPlace: strings only please!

Removing the pyc file and reimporting fixed this.