cgi parameters lost because os.exec!

Mathieu Drapeau mathieu.drapeau at mcgill.ca
Thu Jun 3 13:49:18 EDT 2004


Hi,
I would like to do something like below but I lost my arguments passed 
via an html web page when I reload python within my script:

/import os,sys
dirName = "/opt/oracle/product/9.2.0/lib"
paths = os.environ.get("LD_LIBRARY_PATH", "").split(os.pathsep)
if dirName not in paths:
    paths.insert(0, dirName)
    os.environ["LD_LIBRARY_PATH"] = os.pathsep.join(paths)
    os.execv(sys.executable, sys.argv)

import Image, ImageDraw
import string
import cgi
from StringIO import StringIO
import sys
import cx_Oracle
values = cgi.FieldStorage()
### rest of the script below ###/

/values/ contains nothing, it is normal because I launch another 
instance of python with "/os.execv(sys.executable/"/ /and that way my 
cgi parameters don't follow the next portion of my script. Is there a 
way to pass my cgi arguments to the second portion of my script?

Thank you,
Mathieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040603/c206235d/attachment.html>


More information about the Python-list mailing list