[Zope] Cautionary tale -- OSError: [Errno 2] No such file or directory

Toby Dickenson tdickenson@geminidataloggers.com
Sat, 5 Apr 2003 00:59:13 +0100


On Friday 04 April 2003 7:32 pm, Scott Burchill wrote:

> I _totally_ agree, in principal, but ...
>
> In my specific situation, the external method launches another program
> from a third party which breaks if the cwd is not correct.  I don't like
> it but have to deal with it until the legacy crud is gone (which I'm
> working on.)

If this is on Unix then the right approach is to fork, chdir in the child, 
then exec.

If this is windows, or you dont want to get into unixness, the no-brainer 
approach is to write a temporary wrapper script or batch file that changes 
directory then runs the real process.

-- 
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson