(newbie) A very weird Python CGI problem, possibly related to os.system
Michal Wallace
sabren at manifestation.com
Mon Nov 26 14:08:24 EST 2001
On 26 Nov 2001, Simon Willison wrote:
> I have a very odd Python CGI problem. I'm writing a simple
> web script which queries Quake III game servers and
> displays the server name / map / number of players on a
> web page. The script works by executing a command line
> program called qstat (www.qstat.org). I'm very new to
> python, and I'm using this project as a learning
> excercise.
[snip]
> qstat = '/u/cs/1/cs1spw/qstat24e/qstat' # Path to qstat
> run = qstat + " -raw ~@~@~ -f " + game + " > " + tmp
> os.system(run)
I think perhaps that run fails. Possibly a permission issiue
with the apache user. Have you verified that tmp does indeed
contain the correct data?
Cheers,
- Michal http://www.sabren.net/ sabren at manifestation.com
------------------------------------------------------------
Give your ideas the perfect home: http://www.cornerhost.com/
cvs - weblogs - php - linux shell - perl/python/cgi - java
------------------------------------------------------------
More information about the Python-list
mailing list