cgi parameters lost because os.exec!

  • Thread starter Mathieu Drapeau
  • Start date
M

Mathieu Drapeau

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top