Python on x10?

Status
Not open for further replies.

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
IF Python is working on the free-hosting server you account is on...big if

###
How to use Python scripts

You need to put your script file into folder [ public_html/cgi-bin ]
OR after you add this line [ AddHandler cgi-script .py ] to file [ .htaccess ] - you can put it in folder [ public_html ]

set the first line of your script with the hashbang of [ #!/usr/bin/env python ]
the name of your script file should end with [ .py ]

be sure and set permissions for your script file to [ 750 ]
if you do not set the permission right you will receive a [ Permission denied ] error

###
This test script works on my free-hosting server
Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

print "Content-type: text/plain\n\n"

print "Hello world from Python"
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,929
Reaction score
118
Points
63
We don't officially support python or perl on Free Hosting at this time. If they work, great. If not, don't expect it to be fixed anytime soon.
 
Status
Not open for further replies.
Top