By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,265 Members | 1,710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,265 IT Pros & Developers. It's quick & easy.

cgi parameters lost because os.exec!

P: n/a
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,

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.