modpython, apache and windows

S

Sam

Hi All,

I am interested in learning python since I am hearing more and more
about python for use in web development

I am starting out on python, with knowledge of PHP some perl

my current hurdle is setting up either apache 1 or 2 with python 2.3.3 I
have installed modpython fine

which informed me that I need to make some configuration changes to
httpd.conf

I have not had it working yet, searches on the web give conflicting
suggestions and so far has confused me

some forums mention spyce and serving .spy files

so far I one explanation worked in that a .py file was parsed but I had
to set the name of the actual file within apache.conf
this seems strange

thanks in advance >> SS
 
S

Steve Holden

Sam said:
Hi All,

I am interested in learning python since I am hearing more and more
about python for use in web development

I am starting out on python, with knowledge of PHP some perl

my current hurdle is setting up either apache 1 or 2 with python 2.3.3 I
have installed modpython fine

which informed me that I need to make some configuration changes to
httpd.conf
These changes are relatively easy, but of course making them requires
access to the files, not always available unless you are managing your
own server.

Note, though, that it's easliy possible to use Python as a CGI language
on most Apache installations.
I have not had it working yet, searches on the web give conflicting
suggestions and so far has confused me
Perhaps if you could explain what it is you are failing to do, you might
eleicit some explicit help.
some forums mention spyce and serving .spy files

so far I one explanation worked in that a .py file was parsed but I had
to set the name of the actual file within apache.conf
this seems strange

thanks in advance >> SS
Try creating a Python file (.py file, with world-executable permissions)
in a cgi-bin directory:

#!/usr/bin/env python
print """Content-Type: text/plain

Hello, world"""

and see if you can call it from a web browser.

regards
Steve
 
S

Steve Holden

Sam said:
Hi All,

I am interested in learning python since I am hearing more and more
about python for use in web development

I am starting out on python, with knowledge of PHP some perl

my current hurdle is setting up either apache 1 or 2 with python 2.3.3 I
have installed modpython fine

which informed me that I need to make some configuration changes to
httpd.conf
These changes are relatively easy, but of course making them requires
access to the files, not always available unless you are managing your
own server.

Note, though, that it's easily possible to use Python as a CGI language
on most Apache installations.
I have not had it working yet, searches on the web give conflicting
suggestions and so far has confused me
Perhaps if you could explain what it is you are failing to do, you might
elicit some explicit help.
some forums mention spyce and serving .spy files

so far I one explanation worked in that a .py file was parsed but I had
to set the name of the actual file within apache.conf
this seems strange

thanks in advance >> SS
Try creating a Python file (.py file, with world-executable permissions)
in a cgi-bin directory:

#!/usr/bin/env python
print """Content-Type: text/plain

Hello, world"""

and see if you can call it from a web browser.

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top