Newbie Question

David Allen s2mdalle at titan.vcu.edu
Thu May 18 21:25:24 EDT 2000


In article <8g1aj1$9t4$1 at solaria.cc.gatech.edu>, Shengquan Liang
<sliang at alabama-lnx.cc.gatech.edu> wrote:
> 
> i installed Python under Windows 2000 and downloaded an exmple HTML file
> with 
>  <FORM METHOD="POST" ACTION="sample1.py">
> 
> in there, in which sample1.py is in the html file directory to process
> the data colelcted
> 
> by the HTML form.
> 
> but when i finished with the form, the browser didn't process the data
> with the Python program, instead, it displayed the source code in the
> browser.
> 
> what's the problem?  Thanks.
> 

WIndows 2000?  What web server are you running?  

It's one of two things.  If you were running UNIX, I'd tell you that
the file needs to be made executable before it can run.  If it is executable,
the web server will realize that it's supposed to post that data to that
file and execute it.  Otherwise, it serves the file as if it were an HTML
document.

Since it's windows, I would read up on the webserver you're using if
 were you.  It will have a configuration option to add .py files to the
list of files that the server considers programs instead of data.  I know
how to do this with apache, but not with windows IIS or anything like
that.

So, in short, RTFM
-- 
David Allen
http://opop.nols.com/
----------------------------------------
My own business always bores me to death; I prefer other people's.
                -- Oscar Wilde        




More information about the Python-list mailing list