[nSLUG] Re: Python and HTML
mspencer at tallships.ca
Fri Jan 9 03:16:44 AST 2015
I think I wasn't paying attention, Fran, so I'm unclear on just what
You're trying to have an httpd server run cgi-bin scripts, written in
Python, on localhost, right?
Are you using Apache as the server? Or another HTTPD server? Do you
have *any* cgi-bin scripts that work as expected with this server?
I'm not even an accomplished novice, let alone a wizard, but I
routinely use several cgi-bin scripts (in Perl, not Python) on my
machine that work fine almost all the time . That's with the
Apache server that came with my Slackware 11.0 distro.
So I'm not clear on whther your problem lies with the Python scripts
you're creating or with the server configuration that is serving the
script text as a doc instead of executing it.
With Apache, there are config details designating which directories
contain cgi-bin scripts. If your server isn't told that a particular
dir contains files *intended* to be executed, then I would infer that
it might not execute them even if they were rwxr-xr-x and properly
formated with #!/path/to/python top line.
Sorry to natter on if you've already addressed that point and I
muddled past it.
 The only recurring error I see in one cgi-bin script may be due to
my coding or due to data from the net not arriving in the form
expected so that my Perl regex stuff fails. Dunno, haven't run it
down. Doesn't happen often. May be a Heisenbug.
Michael Spencer Nova Scotia, Canada .~.
mspencer at tallships.ca /( )\
More information about the nSLUG