| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Jul 2005
Posts: 1,492
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | How to execute a python script? 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!!!
__________________ ||||newsiness.com||||'""|""\__,_ | _[lol]___[lol]____ l ||__|__|) |(@)(@)"""""""**|(@)(@)**|(@) 100% Free Online Flash games |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Oct 2006
Posts: 972
![]() ![]() | Have a look at http://www.thesitewizard.com/archive...toapache.shtml to see how to configure CGI for Apache. |
| |
| | #3 (permalink) |
| NamePros Member Join Date: Jun 2007
Posts: 35
![]() | try creating an .htaccess (thats dot htaccess) file in your web root with Code: AddHandler cgi-script .py
__________________ DopeDomains - 15,000+ New Domains added daily. Indexed by Price, Hits, Pagerank, and Length. Domains starting at $5. |
| |
| | THREAD STARTER #4 (permalink) | ||||
| Senior Member Join Date: Jul 2005
Posts: 1,492
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
__________________ ||||newsiness.com||||'""|""\__,_ | _[lol]___[lol]____ l ||__|__|) |(@)(@)"""""""**|(@)(@)**|(@) 100% Free Online Flash games | ||||
| |
| | #5 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Tucson, AZ
Posts: 689
![]() | 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 |
| |