473,394 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CGIHTTPServer, popen3, and windoze

Hello all,

I may well post this a a bug on Monday (after testing with Python 2.3)
- but I thought I'd post here to see if anyone has any ideas.

The basic problem is that under Python 2.4 (and windoze XP SP2)
CGIHTTPServer isn't passing the CGI environment variables to scripts it
runs.

I've checked that the environment variables all exist in os.environ
before the subprocess is launched using popen3.

I've *also* checked that when I launch a test subprocess using popen3
myself, environment variables *are* passed on - so I'm a bit
confused...

I wonder if anyone can shed any light on this behavior ?

All the best,
Fuzzyman
http://www.voidspace.org.uk/python

P.S. I've also patched CGIHTTPServer so that it can handle paths wih
spaces and CGIs in subdirectories of the 'cgi-bin' folder. I'll
*suggest* these changes to the maintainers - but my tests were on the
original version.

Sep 11 '05 #1
1 1304

Fuzzyman wrote:
Hello all,

I may well post this a a bug on Monday (after testing with Python 2.3)
- but I thought I'd post here to see if anyone has any ideas.

Hmm... testing on Python 2.3 I *don't* have the same problem - but it's
very frustrating under Python 2.4 (different machine). I wonder what
else is different ?

Fuzzyman
http://www.voidspace.org.uk/python
The basic problem is that under Python 2.4 (and windoze XP SP2)
CGIHTTPServer isn't passing the CGI environment variables to scripts it
runs.

I've checked that the environment variables all exist in os.environ
before the subprocess is launched using popen3.

I've *also* checked that when I launch a test subprocess using popen3
myself, environment variables *are* passed on - so I'm a bit
confused...

I wonder if anyone can shed any light on this behavior ?

All the best,
Fuzzyman
http://www.voidspace.org.uk/python

P.S. I've also patched CGIHTTPServer so that it can handle paths wih
spaces and CGIs in subdirectories of the 'cgi-bin' folder. I'll
*suggest* these changes to the maintainers - but my tests were on the
original version.


Sep 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William D. Gill | last post by:
I use a notebook (win 98) because of its portability. Unfortunately it is very slow. When I try to develop and test python cgi scripts I use Xitami as a local server, but with python, Xitami, and...
6
by: pxlpluker | last post by:
i was looking at twisted but it appears to be WAY beyond my megar skills at this point. so i think CGIHTTPServer will fit my needs if it is pretty stable. I have a small python cgi that i was...
1
by: Sullivan | last post by:
When I run a CGI script (Python) with Python's CGIHTTPServer, it should run with the UID of the user 'nobody' (as the documentation says). But if I let the CGI script e.g. create a file, it...
13
by: Russell E. Owen | last post by:
I'm trying to launch an application from Python 2.3 on Windows. The application is "ds9" (an image viewer), and is installed in C:\Program Files\ds9\ds9 On unix I just do: os.popen3("ds9") and...
2
by: Johan Kohler | last post by:
Hi, I'm using CGIHTTPServer (via its test() method) to test some CGI on my Windoze 98 box. I find that the execution is very slow. Is there anything I can do to make sure I'm getting the best...
2
by: Jakob Simon-Gaarde | last post by:
Follow-up on a thread from 1999 (see below) Well now it is 2005 and the operating system I'm using is Windows Server 2003, and I can still see that the same problem persists with: ...
2
by: Pierre Rouleau | last post by:
Hi all, I have a consistent test case where os.popen3() hangs in Windows. The system hangs when retrieving the lines from the child process stdout. I know there were several reports related to...
0
by: Jonathan Mark | last post by:
hi all... I wrote a seemingly simple function (below) to use Popen3() and select() to run a program and capture its exit status, stdout output, and stderr output. It worked fine until the box...
1
by: mpc | last post by:
hello, how does one run a PHP page with a python webserver? Lets say i have a simple python web server running /path/webserver.py #!/usr/bin/env python from BaseHTTPServer import HTTPServer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.