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 the current working directory). Apparently, you have one of them installed. In general, it is a bad idea to change the current working directory in a multi-threaded application (such as Zope). An External Method does not have a specific working directory "when it is run". Because Zope must not modify the working directory, it cannot let it follow the "run of an External Method". The current working directory remains what it was. On a system with well behaving products, the current working directory remains the "INSTANCE_HOME". > ... >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. The "Extensions" directory is a bad place for temporary files... -- Dieter _______________________________________________ Zope maillist - Zope@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 )