Hi, I have a Python program where the initiation script looks like this:
if __name__ == "__main__":
main(sys.argv[1:])
To run this, I have to use Shell or Terminal like this:
myscript somefile.xml
The script accepts a file and then does all the rest of the work. Now, I am trying to run this program on a web server.
SO I use a HTML Form to submit the file to this script. In my Python script, I am doing like this:
....
elif req.form.has_key("filename"):
item=req.form["filename"]
if item.file:
req.write("I GO HERE")
myscript.main(item)
....
As you can see here, I am trying to send the file directly to the "main" function. Is this the right way to do?
I dont get any script error, but the Python script is not producing the expected results.
Any help? Thanks