Got Python web host, yay! Now what?

Discussion in 'Python' started by Robert Oschler, Aug 21, 2003.

  1. I found a good web host that has Python 2.x support and I've set up an
    account. It's LunarPages.com if you're interested . Do I have to do
    anything special to run Python scripts, besides upload the script to the
    cgi-bin directory? If so, please direct me to a good web page or doc that
    goes into the necessary details.

    thx

    --

    Robert Oschler
    "Let the web hear you, add your voice to your web site in minutes!"
    -- http://audiodirect.spiderchase.com/
    (For a limited time, free voiceover with every sign-up, use this link
    instead)
    -- http://audio.spiderchase.com/
    (A song - are you blue?)
    -- http://bluedreams.spiderchase.com/
     
    Robert Oschler, Aug 21, 2003
    #1
    1. Advertising

  2. Robert Oschler

    Sheila King Guest

    On Thu, 21 Aug 2003 16:47:07 GMT, "Robert Oschler"
    <no_replies@fake_email_address.invalid> wrote in comp.lang.python in
    article <fI61b.13939$>:

    > I found a good web host that has Python 2.x support and I've set up an
    > account. It's LunarPages.com if you're interested . Do I have to do
    > anything special to run Python scripts, besides upload the script to the
    > cgi-bin directory? If so, please direct me to a good web page or doc that
    > goes into the necessary details.
    >
    > thx


    This will depend on the set up that your web host provides.

    On the server where I host, I simply upload my scripts to cgi-bin and they
    run.

    However, I recently helped someone set up a script on a different server,
    and after a couple of hours of tearing our hair out, we found out that on
    that server, all scripts had to be renamed to have a .cgi extension, or
    they would not run. (I've usually run my scripts with a .py extension.)

    So, you should check with your host to find out what requirements they may
    have for running cgi scripts.

    --
    Sheila King
    http://www.thinkspot.net/sheila/
    http://www.k12groups.org/
     
    Sheila King, Aug 21, 2003
    #2
    1. Advertising

  3. Robert Oschler

    Tyler Eaves Guest

    On Thu, 21 Aug 2003 16:47:07 +0000, Robert Oschler wrote:

    > I found a good web host that has Python 2.x support and I've set up an
    > account. It's LunarPages.com if you're interested . Do I have to do
    > anything special to run Python scripts, besides upload the script to the
    > cgi-bin directory? If so, please direct me to a good web page or doc that
    > goes into the necessary details.
    >
    > thx
    >
    > --
    >
    > Robert Oschler



    3 things to watch out for

    1. Make sure permissions are set to 755 (chmod 755 yourscript.py)

    2. Make sure the 'bang' line (the first line of the file) is correct.
    If python is at /usr/bin/python, the first line of the file should
    be exactly #!/usr/bin/python

    3. Make sure your script outputs a Content-type (and possibly other, as
    needed) headers.

    Code sample:

    print 'Content-type: text/html'
    print ''
     
    Tyler Eaves, Aug 22, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Nitulescu
    Replies:
    0
    Views:
    370
    Alex Nitulescu
    Feb 22, 2005
  2. Orpheus66
    Replies:
    0
    Views:
    4,503
    Orpheus66
    Jul 30, 2003
  3. Yasin Cepeci
    Replies:
    2
    Views:
    450
    Yasin cepeci
    Jun 7, 2007
  4. ruby on rails! yay!

    , Oct 21, 2005, in forum: Ruby
    Replies:
    3
    Views:
    92
    Eric Hodel
    Oct 26, 2005
  5. Phillip Gawlowski

    HTML entites in ClothRed: yay or nay?

    Phillip Gawlowski, Apr 12, 2007, in forum: Ruby
    Replies:
    2
    Views:
    144
    John Joyce
    Apr 12, 2007
Loading...

Share This Page