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.
When I've needed to do simple stuff with this
When I've needed to do simple stuff with this is the past, I just
manipulate mailmain by send email from Zope to mailman's admin interface...
Pipes seem easier to me. Responses from the command line scripts seem
much easier to use for confirmation. And there are things you can do
easily
jwithers wrote:
eep, another one, hope we're not related ;-)
Can anyone tell me what the default working directory for an external
method is?
You can't rely on it being anything. If you're working with files, you
need to be very careful...
Further, I need this to create a file temporarily
jwithers wrote at 2005-9-28 15:43 -0700:
...
I have an external method that at this point is made up of nothing but
os.getcwd() and lives in my Extensions directory. When it is run, it
reports the working directory as being one of my Products directories.
Some products are broken (they change
On Thu, 2005-09-29 at 00:20, Chris Withers wrote:
eep, another one, hope we're not related ;-)
When I saw your posts on newsgroups years ago, I almost gave up python
programming altogether Chris, thinking that any given field of endeavor
needs only one Withers, but decided to go ahead and
Folks,
I have an external method that at this point is made up of nothing but
os.getcwd() and lives in my Extensions directory. When it is run, it
reports the working directory as being one of my Products directories.
Can anyone tell me what the default working directory for an external
method
Products?? That is odd. I thought it was the var/ directory or at
least the zope instance home directory. From the External method you
should have access to INSTANCE_HOME and SOFTWARE_HOME. Try if these
are what you want. I doubt that you'll find your Extensions/ dir in
any of them so you might
jwithers,
a) Is your os.getcwd() (in /Extensions) called from a Product (in
/Products?) Otherwise I have not idea
b) Regarding temporary files ..
I've used stuff like ...
import tempfile
tmpFile2 = tempfile.mktemp()
theFile=open( tmpFile2,'rb')
result = theFile.read()