Web programming: Python: finding server version

The tutor tells how to determine the version of Python the server is using.

I’ve found two ways to print out the version of Python used by the remote server:

import platform
print “Content-type: text/html\n\n”
print(platform.python_version())

or else

import sys
print “Content-type: text/html\n\n”
print(sys.version)

HTH:)

Source:

docs.python.org/2

docs.python.org/2

stackoverflow.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Tagged with: , , ,

Leave a Reply