Pystrip consists of three files, assem.py, ctransform.py, and
pystrip. Assem.py provides an interface to an assembler and
disassembler for the Python byte codes. Ctranform.py provides an
interface for applying code transformation filters to compiled modules
and saving them back out. Pystrip is a short file that defines a code
transform that removes SET_LINENO instructions from the compiled
modules specified on its command line.
Installation:
Before you can use either assem.py or ctransform.py, you must build
a new python executable that includes the C module
Modules/newmodule.c. Edit the file Module/Setup, looking for a line
like:
#new newmodule.c
Uncomment this line (remove the #) and remake python by typing
'make'. When make finishes, copy the executable python to a directory
in your shell's path, typically /usr/local/bin/.
Copy the files assem.py and ctransform.py to your Python library
directory, typically /usr/local/lib/python1.4/. Copy pystrip to a
directory in your shell's path, typically /usr/local/bin/.
You should now be able to run pystrip on any compiled Python
modules.
Trouble:
If you should have trouble with pystrip or any of its components,
please feel free to Email. I will attempt to help you out but I can't
make any promises.
Mike McDonald
[email protected]
April 8, 1997