thanks mark and barry. i've been traveling so apologies for the delayed reply...
using `bin/mailman shell` command does indeed work flawlessly, thank you! should the docs be updated perhaps? something either under "getting started with GNU Maiman" or even a specific page on "interacting with mailman through the python interpreter"? i am happy to add something or contribute to that; i think it would certainly facilitate others working with the software if that bit was a bit more clear. in general, what is that the recommended way to script one's own interactions with mailman as part of a larger python program? would it be through mailman.client "official bindings"? i see there are a number of imports in bin/mailman and subsequently in src/mailman/commands/cli_withlist.py (which i gather is an alias for "shell"). should those be a sufficient set of imports and initializations? in this particular case, i am building a django app so it seems i can rely on postorious and mailman.client, but that wouldn't necessarily be the case in general, and my curiosity is piqued about how the scaffolding process and imports work so i can do things The Right Way. thanks! jessy On Tue, Jun 5, 2012 at 7:09 PM, Barry Warsaw <ba...@list.org> wrote: > Hi Jessy, > > You're doing everything right, but there's one conceptual step that you're > missing, and which isn't evident from the docs. > > As Mark says, `mailman shell` is the best way to get a Python interactive > interpreter shell to play with the internal Mailman API. Why is this > better > than just running the virtualenv's `python` interpreter directly? It's > because there are a bunch of subsystems that have to be initialized before > things will work correctly. E.g., the Zope component architecture (ZCA), > the > logging subsystem, the configuration subsystem, queues, rules, pipelines, > etc. The exception you're getting is because the ZCA hasn't been > initialized > yet. > > `mailman shell` ensures that everything is initialized, then it gives you > an > interpreter prompt. > > Hope that helps. > -Barry > _______________________________________________ > Mailman-Developers mailing list > Mailman-Developers@python.org > http://mail.python.org/mailman/listinfo/mailman-developers > Mailman FAQ: http://wiki.list.org/x/AgA3 > Searchable Archives: > http://www.mail-archive.com/mailman-developers%40python.org/ > Unsubscribe: > http://mail.python.org/mailman/options/mailman-developers/jessy%40jessykate.com > > Security Policy: http://wiki.list.org/x/QIA9 > -- Jessy http://jessykate.com _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9