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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lamar_air

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

    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("webt ablx4002")
    and then i just added webtablx4002 at c:\folder1\fold er2 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?
Working...