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 > terminal?)
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. HTH Steve ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp