Jump to content

How do you run a Python script?


Recommended Posts

Posted

I chmod'ed a .py file to 755 and went to the URL, but that just showed the contents of the file; it didn't run it.

Posted

You could try adding these two directives in your root htaccess file:

 

AddHandler python-program py
AddType application/python py

 

I can't say for sure that will fix the problem. Try it and see and if it still doesn't work, post your script if it's a simple one.

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...