[Zope] External Method Working Directory?

Peter Bengtsson peter at fry-it.com
Wed Sep 28 20:00:37 EDT 2005


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 have do something like:

import os
return os.path.join(INSTANCE_HOME, 'Extensions')


2005/9/28, jwithers <withers at rampeffect.com>:
> 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 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 at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope mailing list