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()

I think this may depreciated but do a google on "python tempfile" and you can use the updated modules if they apply to your issue.


jwithers wrote:


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 is?

Further, I need this to create a file temporarily in Extensions. I would prefer not to have to hardwire the location of Extension into the
code, since that would make the script non-portable to other instances easily.

Any advice on this would be appreciated.

J. P. Withers


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to