Unstoppable Domains

How to execute a python script?

Spaceship Spaceship
Watch

newsiness

VIP Member
Impact
49
My current hosting unable to execute .py script. When i execute the .py file it shows the script code on the page, for example:http://wapnews.mobi/example.py Any idea so that i can execute this .py script on my current hosting? Can i configure the Apache Handlers to execute this script? If yes, how? Thanks in advance!!!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
•••
try creating an .htaccess (thats dot htaccess) file in your web root with
Code:
AddHandler cgi-script .py

-JasonR
 
0
•••
DopeDomains said:
try creating an .htaccess (thats dot htaccess) file in your web root with
Code:
AddHandler cgi-script .py

-JasonR

added...but it shows Internal Server Error...any idea? Thanks
 
0
•••
Is your shebang correct? There should be a line at the top of the file that points to the location of the python interpreter, so if it's installed in /usr/bin, then the shebang should be
Code:
#!/usr/bin/python
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back