How to run POST requests with Python scripts in Windows 95

when the cgi wrapper cgi.py receives a POST request, it creates temporary files for holding the data. it uses a UNIX trick to prevent other users from accessing the new file by issuing an unlink (ie. delete) immediately after opening the file (see method make_file in class FieldStorage in cgi.py). when the process terminates, the unlink will actually be performed.

however, in win 95 (well, at least in my machine), a file cannot be deleted while it is open - it results in "permission denied" error. in order to prevent this error, i've created a new version of cgi.py which does not unlink the temporary file during the make_file method but rather deletes all the temporary files from the \temp directory at the end.

so if you're planning to test python scripts in Windows 95, shift-click to download this version of cgi.py and place it in your cgi-bin directory.


updated 11/19/97