[Zope] Re: External Method Working Directory?

Tres Seaver tseaver at palladion.com
Thu Sep 29 16:02:50 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jwithers wrote:

> Because I need to feed the file to Mailman for evil purposes of my own
> (well, fairly mundane purposes of allowing my zope app to manipulate
> mailman list memberships, really) that the prototype mailman adapter I
> found doesn't meet.

BTW, I have experimented with the XML-RPC patch for Mailman 2.1.6:

 http://sourceforge.net/tracker/index.php?func=detail&aid=1244799&group_id=103&atid=300103

It seems to work nicely from "command-line" Python, although I haven't
yet got around to driving it from within Zope.

> And yeah, tempfile would work, although, I have to
> admit I really don't see the point of it when you are only storing one
> file. I am probably missing some usecase or good programming practice
> here, but it seems like it saves you a single line for the delete in
> return for an extra module import.

What you really buy with that import is that other people have thought
about, and fixed bugs for, the race conditions involved in creating
tempfiles.

> Peter Bengtsson gave me the solution in just using the INSTANCE_HOME
> variable directly, which is bound in external scripts. That beat the
> daylights out of the solution that had come up wjth the help of some
> folks on ICQ of using self.Control_Panel.getINSTANCE_HOME(). And Deiter
> is right and it is dim to put the temporary file in Extensions and it
> will be put in var instead. Not sure what I was thinking there.

In a "locked down" configuration, the user as whom Zope runs won't be
able to write into any directory on the system *except* the 'var'
directory (and a 'logs' directory if you feel obsessive about keeping
the logs elsewhere), so that works out well.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPEhq+gerLs4ltQ4RAibEAKCCqeR2hpZ0bCkH1aAueTfT6k358wCgp5nE
Xve1bwxcwQ+rKehuxtNpaKw=
=YUXq
-----END PGP SIGNATURE-----



More information about the Zope mailing list