[Mailman-Users] How to change defaults...

Greg Ward gward at mems-exchange.org
Mon Sep 17 16:57:39 CEST 2001

On 17 September 2001, Joao Borsoi Soares said:
> I'm new in mailman and python. Can someone help me on how to compile a
> .py to a .pyc? I made changes in the Defaults.py.

Usually, do nothing.  The next time Python imports the .py file, it
automatically recompiles it.

Note that the user running Python must be able to write to the
directory containing the code.  If this is a CGI process, then it's
quite possible (highly desirable even) that the user will not be able to
write the .pyc file.  In that case, Python will always have to re-parse
the .py file, slowing things down a bit.

In that case you can use the compileall module/script supplied with
Python.  If Python is in /usr/local:
  /usr/local/bin/python /usr/local/lib/python2.1/compileall.py ~mailman/Mailman

...or something like that.  This is from memory, your mileage may vary.
RTFM: "pydoc compileall".

Greg Ward - software developer                gward at mems-exchange.org
MEMS Exchange                            http://www.mems-exchange.org

More information about the Mailman-Users mailing list