Phython
Python is a wonderfully powerful dynamic programming language that is used in a wide variety of application domains. Python is frequently compared to Tcl, Perl, Ruby, Scheme or Java.
Path to Python Interpretor | /usr/bin/python |
---|---|
Current version | 2.5.1 |
Example
Here’s a simple CGI script that shows how to connect to a MySQL database on our platform, and run a simple query:
#!/usr/bin/python
import MySQLdb
print “Content-type: text/html\n”
conn = MySQLdb.connect (host = “mysql.interdns.co.uk”,
user = “username”,
passwd = “password”,
db = “username”)
cursor = conn.cursor ()
cursor.execute (“SELECT VERSION()”)
row = cursor.fetchone ()
print “server version:”, row[0]
cursor.close ()
conn.close ()