Hello!
I'm new to X10 Hosting, and found in the forums that python is supported. thats really great!
I ad a lots of problems running my first scripts ...
... file permission not set to 0755,
... Apache python handler not set
... newlines encoded with 0x0D instead of 0x0A,
... first output was not "Content-type: text/plain\n\n",
... path to python was wrong,
And so here are new problems i encountered:
Where is python? it seems to work with
"#!/usr/local/bin/python"
and
"#!/usr/bin/python"
Additionally i cant import MySQLdb.
I used the following script:
#!/usr/local/bin/python
print "Content-type: text/plain\n\n"
(replace "...." with spaces)
it produced the output:
No module named MySQLdb
thats not good i think ;-)
so how can i use SQL/DB in my python scripts?
I'm new to X10 Hosting, and found in the forums that python is supported. thats really great!
I ad a lots of problems running my first scripts ...
... file permission not set to 0755,
... Apache python handler not set
... newlines encoded with 0x0D instead of 0x0A,
... first output was not "Content-type: text/plain\n\n",
... path to python was wrong,
And so here are new problems i encountered:
Where is python? it seems to work with
"#!/usr/local/bin/python"
and
"#!/usr/bin/python"
Additionally i cant import MySQLdb.
I used the following script:
#!/usr/local/bin/python
print "Content-type: text/plain\n\n"
(replace "...." with spaces)
PHP:
try:
....import MySQLdb
....import string
except Exception, e:
....print e
it produced the output:
No module named MySQLdb
thats not good i think ;-)
so how can i use SQL/DB in my python scripts?