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
-- 
Greg Ward - software developer                [EMAIL PROTECTED]
MEMS Exchange                            http://www.mems-exchange.org

------------------------------------------------------
Mailman-Users maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users

Reply via email to