Nerses Ohanyan writes:
I have set up everything, but it simply doesn't work. How can I debug
my code? How can I see what the code is doing (i.e. can I print to
You can run it under an interactive Python, I'm sure, but you'll need
to do a bunch of importing by hand and preparation of test input and
stuff like that. It will depend on what your code does. I've never
done it, though, so I can't really say.

As I wrote, you can write to a log, there are a couple of examples in
the standard handlers. If you want to see that in real time, you can
tail the log. It's as easy as

from Mailman.Logging.Syslog import syslog
def process(mlist, msg, msgdata):
syslog('mylog', 'Got right HERE --> <-- I mean, LEFT here!')

and you'll find the "got here ..." message in $MAILMAN_HOME/log/mylog.

If you want something more interactive than that, it's beyond my
experience. I'd suggest that you ask on comp.lang.python, but of
course you'll have to provide most of the Mailman specifics yourself.



Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 8 | next ›
Discussion Overview
groupmailman-users @
postedSep 6, '06 at 10:31p
activeSep 8, '06 at 5:41a



site design / logo © 2022 Grokbase