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
I have gone through the N2 CMS documentation at length and can see no
I've been considering image hosting services for a project but am starting to wonder
I'm getting confused re the range of options for development & deploying some simple
I'm getting a really bad end of a day as I started to change
I'm using log4net to log my web app's progress, using Log4PostSharp to AOP-injectify all
My attempts at enabling SessionState are failing :-( I've added the following page directive
I'm trying to use two different methods of connecting to a database to edit
Per the above I am trying to re-target a fresh ASP.NET MVC 2 application
I'm trying to run a distance transform on a thresholded binary image in order

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.