modpython, apache and windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sam

    #1

    modpython, apache and windows

    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


    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.298 / Virus Database: 265.6.7 - Release Date: 30/12/2004

  • Steve Holden

    #2
    Re: modpython, apache and windows

    Sam wrote:
    [color=blue]
    > 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
    >[/color]
    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.
    [color=blue]
    > I have not had it working yet, searches on the web give conflicting
    > suggestions and so far has confused me
    >[/color]
    Perhaps if you could explain what it is you are failing to do, you might
    eleicit some explicit help.
    [color=blue]
    > 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
    >
    >[/color]
    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
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119

    Comment

    • Steve Holden

      #3
      Re: modpython, apache and windows

      Sam wrote:
      [color=blue]
      > 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
      >[/color]
      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.
      [color=blue]
      > I have not had it working yet, searches on the web give conflicting
      > suggestions and so far has confused me
      >[/color]
      Perhaps if you could explain what it is you are failing to do, you might
      elicit some explicit help.
      [color=blue]
      > 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
      >
      >[/color]
      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
      --
      Steve Holden http://www.holdenweb.com/
      Python Web Programming http://pydish.holdenweb.com/
      Holden Web LLC +1 703 861 4237 +1 800 494 3119

      Comment

      Working...