Is it possible to pass CSV Reader Object As Argument to another Python File ??? Options

Bansilal Haudakari mail2bansi at gmail.com
Wed Jan 26 11:16:02 EST 2011


I have following two python scripts
-namelookupWrapper.py
-namelookup.py

The namelookupWrapper.py takes input of "memberId", "memberName" from
CLI and has following code snippet

idf = sys.argv[1]
namef = sys.argv[2]
real_script = "C:\\Splunk\\etc\\apps\\search\\bin\\namelookup.py"
r = csv.reader(sys.stdin)
os.execv(python_executable, [ python_executable, real_script ] +
sys.argv[1:] )

Wondering how would i pass csv reader object "r" as an argument using
os.execv() to another python script i.e. namelookup.py
Regards,
Bansi
-----------------------------------------------------
Bansilal Haudakari
SUN Certified Enterprise JAVA Architect / Programmer
http://bansihaudakari.wordpress.com/
L:703-445-2894
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110126/9378f2ea/attachment.html>


More information about the Python-list mailing list