How to get a running process to recompile certain scripts

Paul Mackinney paul at mackinney.net
Wed Jan 22 12:19:16 EST 2003


I'm tinkering with a custom archiver for Mailman. My scripts are getting
called just fine, but I'd like to be able to update them without having
to halt Mailman.

The current call (from Mailman's Archiver.py script) is:

	if <the mailing list is my test list>:
      from Mailman.Archiver.PaulArchiver import PaulArchive
      PaulArchive(self, msg)

Right now PaulArchive.py is a single script containing the PaulArchive
method and all my other code. It's in the Mailman src folder, and when I
change it I stop Mailman, rebuild, and start it again.

I'd like to replace it with something 
like:

  # PaulArchiver.py
	sys.path.append(<my working dir>)

	def PaulArchive.py(mailinglist, message):
	  MyWorkingScript(<params>)

The thing I don't know how to do is to have changes to the scripts in
<my working dir> recompiled without restarting Mailman since it's a
working server for other lists (that use the regular archiver).

TIA, Paul
-- 
Paul Mackinney
paul at mackinney.net





More information about the Python-list mailing list