script not opening applications

E

elrondrules

hi

i have a html as follows:

<form action="/cgi-bin/hello.py" method="get">

<input type="submit" value="Run Test">
</form>

my hello.py is as follows

<snip>

import os

os.system ("export DISPLAY=10.0.1.1:0.0")
os.system ("./Test &") #Testtool opens a new window

<snip>

What I expected this to do was once I click "Run Test" it should run
the hello.py script and open a new window for the Test application.
both the hello.py and the test application are in the cgi-bin
directory

If I run the hello.py in the command line it works fine but not
through the html...

Any idea as to whats missing..

Thanks
 
D

Dennis Lee Bieber

os.system ("export DISPLAY=10.0.1.1:0.0")

creates a new "shell" using the environment of the parent Python
program and executes the command. Shell goes away, along with any local
environment changes.
os.system ("./Test &") #Testtool opens a new window
creates a new "shell" (using the environment of the Python program),
has no knowledge of any environment changes from the previous
os.system() call.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

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

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,125
Latest member
VinayKumar Nevatia_
Top