0

I have downloaded and installed python on my PC. I am learning python at this moment so I am a beginner.

Is there anyway I could execute python scripts in localhost (Apache) and view them in a web browser as we do with PHP? I am executing the python scripts from CLI at this moment.

3

2 Answers 2

1

Although there are multiple solutions, I would take a look at mod_python. Unfortunately, in my experience it is not the easiest thing in the world to set up and requires making changes to httpd.conf, but this tutorial is helpful (and gives some examples).

Sign up to request clarification or add additional context in comments.

Comments

0

Google App Engine SDK for Python includes a local web server application that simulates the App Engine environment. It allows for instant server script changes by just saving the file and refreshing the browser.

The development tutorial is here

Once you have your web site working locally, it is easy to deploy it live on Google's App Engine servers.

2 Comments

The OP didn't ask about Google Apps
OP didn't ask about mod_python either. What part of my answer does not give him the ability to execute a python script in localhost? Do you think someone new to Python will be able to use mod_python? I know from my own experience that GAE's dev tool is easy to install and use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.