Dynadot โ€” .com Transfer

How to execute a python script?

SpaceshipSpaceship
Watch
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.
AfternicAfternic
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
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back