Proudly Serving in 50+ Countries, 8 Years of Excellence!

Search for any topic you need help with

How to run python in shared cPanel Hosting

Last Update: May 31, 2020

Here is how a Python script can be executed on our shared hosting servers.

1. Upload the .py file into a folder
2. Create an .htaccess file into the same folder and include the following line: AddHandler cgi-script .py
3. Edit the .py file(s) by adding “#!/usr/bin/python” in the first line
4. The permissions for .py file(s) should be 755 And you’re done – you can now successfully execute Python.

Thats it!

Copyright 2010 - 2020 - DozeHost.com - All Rights Reserved.

Terms of Services / Privacy Policy