NameSilo

How to execute a python script?

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
try creating an .htaccess (thats dot htaccess) file in your web root with
Code:
AddHandler cgi-script .py

-JasonR
 
0
Close
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
Close
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
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back