Re: [Mailman-Developers] Interacting with mailman remotely through APIs / wrappers
Thanks Lennon,
What you describe below seems to be very close to what I am attempting to do, other than that I have been trying to avoid the cron/SSH stuff. I've managed to get basic implemetations of the SOAP stuff working, with a PHP SOAP client talking to a ZSI SOAP server on the Mailman box.
Regarding the Python APIs, I wondered if there is any documentation available? At the moment I am going over the source, which is a bit heavy going.
For example, I am having trouble working out if it is possible to create a new list from the Python modules directly?
Any pointers to the right docs here would be appreciated.
Regards, Benjamin
----- Original Message ---- From: Lennon Day-Reynolds <lennon@reed.edu> To: mailman-developers@python.org Sent: Monday, 21 May, 2007 10:59:52 PM Subject: Re: [Mailman-Developers] Interacting with mailman remotely through APIs / wrappers
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Barry Warsaw wrote:
[...] I wonder if there isn't a cleaner way to integrate PHP and Python.
Does anybody know? Or is some form of IPC really the only way to go?Writing command line interfaces to provide the functionality you want
should not be difficult at all, if you are comfortable writing Python.
I've built applications that manipulate Mailman data using both the internal Python APIs and the command-line scripts, and I can say that both have their pleasantries and annoyances in about equal share.
Generally, the command-line tools are "good enough," and are certainly easier to expose to anything not written in Python. However, the argument handling is just different enough between tools to make a totally general bridge difficult to write without special cases for each action (add/list/remove member, add/show/delete list, etc.).
We have Perl and Ruby apps using the CLI tools to manipulate list membership, though most run either under cron or an interactive SSH session to the Mailman server.
The Python APIs can be faster, and certainly give you more powerful (read: unrestricted) access to list data. For operations over large numbers of lists, though, the unmarshalling of list pickles seems to be the limiting factor, not the Python startup overhead.
One such all-Python application I've developed for use here at Reed uses web.py and the Mailman Python APIs to expose a quick 'opt-in' interface to a subset of our campus mailing lists. We rely on our LDAP directory and web single-sign-on infrastructure to simplify the subscription process: basically, after completing SSO auth, users can simply check the subscription box next to each list name, and be automatically added to (or removed from) it.
I'm eagerly looking forward to MM3 (or at least the SQLAlchemy branch) making much of the hackish local customization work I've done unnecessary. The XML-RPC interface sounds interesting, too, though I don't know that it will really offer enough to prompt a rewrite of all our command-line driven add-ons.
Lennon Day-Reynolds Systems Programmer Reed College -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGUghIRtirLnfvQskRAoaMAKCpAwxGPFJzXyEMgTJDLyLo7Hs+uwCdHP/l HMJgJcyut94SzbgOC9IAcRo= =77oH -----END PGP SIGNATURE-----
Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/benjaminsims%40yah...
Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
On Thu, 2007-05-24 at 09:10 -0700, Ben Sims wrote:
Regarding the Python APIs, I wondered if there is any documentation available? At the moment I am going over the source, which is a bit heavy going.
For example, I am having trouble working out if it is possible to create a new list from the Python modules directly?
Any pointers to the right docs here would be appreciated.
Your best bet might be to look at the command line interfaces under the /bin directory in the source tarball. For the case cited you'll want to look at bin/newlist.
John Dennis <jdennis@redhat.com>
participants (2)
-
Ben Sims
-
John Dennis