Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3624262
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:29:09+00:00 2026-05-18T23:29:09+00:00

Can anyone assist me in getting a Python script running on Hostgator Shared hosting?

  • 0

Can anyone assist me in getting a Python script running on Hostgator Shared hosting? I work with PHP mostly, but have taken a liking to Python, and would like to try to get it going on the web. The only way I’ve ever ran Python is with either the interpreter, or through a terminal, with >Python file.py. I tried just uploading a hello world file to the webserver, but all it outputs is the script source. I talked with hostgator, but all they could tell me was I need to use a dispatcher, which I cannot seem to find an example of. All I want to know, is how to make a <p>Hello</p> output to the browser.

Thanks, and sorry if I’m rambley, I’ve been Googling this off and on all week now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:29:10+00:00Added an answer on May 18, 2026 at 11:29 pm

    Well, I got this from Hostgator’s own support site.

    Assuming your host is running Python 2.x, then you can adapt the linked-to script as follows:

    #!/usr/bin/python
    print "Content-type: text/html\r\n\r\n"
    print "<html><head>"
    print "<title>CGI Test</title>"
    print "</head><body>"
    print "<p>Test page using Python</p>"
    print "</body></html>"
    

    and put it in your cgi-bin folder with permissions of 755.

    Update: In terms of “getting around” the cgi-bin folder: that’ll depend on options your hosting package allows. Look at Bottle for a simple dispatcher which fits in a single Python module. You can deploy it using CGI,

    import bottle
    # Put your bottle code here, following the docs on the Bottle site
    bottle.run(server=bottle.CGIServer)
    

    Further update: Apart from the Bottle docs, I suggest you read the Python docs about CGI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wondering if anyone can assist.. I am adding some jquery to my site, but
Does anyone know of any free tools that can assist in converting an SQL2005
Can anyone help me? I can't figure out what I am doing wrong but
I have some issues with getting the RescueAttribute in Caliburn 1.1.0 to work. Basically
I have a problem, and I can't seem to work out how to solve
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can anyone tell me how I can display a status message like 12 seconds
Can anyone recommend a good library for generating an audio file, such as mp3,
Can anyone recommend some good resources that highlight the differences between Oracle and the
Can anyone point me to a good resource (or throw me a clue) to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.