[Zope] Python script problem

List Subscriber @ Neurobs list_subscriber@neurobs.com
Sun, 11 Aug 2002 22:05:23 -0700


>
>
>
>Unix processes want an additional "argument 0" which by default is
>the name of the program file.
>
I found that out, however, heres a puzzle then:

I am doing exactly the same thing while unzipping uploaded files.... ie 
in the code replace '/usr/bin/zip' with '/usr/bin/unzip' and hte args 
and the other stuff... and that seems to work everytime. If agree about 
the argv[0] thingy, however then my unzipping shouldnt work either.

Re: Dennis' solution of using os.system, the docs say if I do a system 
it replaces the calling thread (I dont yet understand the meaning of 
replace in this context) and only resumes after returning. In a web 
server environ wouldnt that be dangerous as it might replace Zope's 
calling thread even if for some time. I confess I dont know how exactly 
the calling mechaninsm for external methods work, but if I was right I 
would have a sequential process which would be bad for a web-site I think.

Re:Chris, I will try popen adn Zipfile again.

Thanks all.
AM