Making changes to a python cgi to be put on a network

L

lamar_air

I have a python cgi that i wrote. The way it works is a user fills
out necessary information on a web form, click submit and the python
script is executed. The script retrieves variables from the form and
writes them to a txt file. The script then calls a executable which
uses this txt file as a set of input parameters.

I'm using this to call the executable
os.system("webtablx4002")
and then i just added webtablx4002 at c:\folder1\folder2 to the
environment variables paths.

I need this executable to be able to run from whatever directory the
form is located in. So if whoever puts this program on the server it
will all be in one directory and it would be nice not to have to
change the code to be specific to that directory.
Is there code to get a directoy path for the script or for the form,
where it is located when it is run?
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top