Python CGI on WinMe/98/95

Kirby Urner urner at alumni.princeton.edu
Tue Aug 14 17:08:48 EDT 2001


I had a sudden need to play with cgi and MySQLdb on a personal
Windows (not a server jobber).  I installed the Microsoft Personal
Webserver first, and fought with it for awhile, then wiped it and went
with Savant.  Making a long story short, I'm running both Perl and
Python scripts in a cgi-bin subdirectory.

However, I wanted to mention what seemed to be a problem and 
MIGHT be a gotcha for others out there in Python world.

In my File Associations for .py and .pyw files, the string I had under
open | edit was something like 

  d:/program files/python21.exe "%1" %1*

That looks a little weird, and indeed, which I'd say OK, I'd get a 
warning about file not found.  And yet when double-clicking on a py
file Windows Explorer (a.k.a. the file manager), I'd get my python
scripts to work (not using cgi mind you, just running regular old 
stuff outside the IDLE environment).

When I finally went back to that file association string and made 
it more what Windows expects, i.e.

  "d:/program files/python21.exe" %1 %1

then Savant started working, and I bet PWS would have too.

I'm thinking if this is a problem more generic than "just me", it's got 
to do with the Python installer trying to deal with users opting to install
in a directory with a space in the path name.  Probably most users 
just opt for c:\python21 or at words x:\python21 (some other drive).
But this x:\program files\... business means trouble (maybe -- did for
me).

Kirby





More information about the Python-list mailing list