How to check version of Python under CGI
Sylvain Thenault
thenault at nerim.net
Thu Jun 13 04:46:09 EDT 2002
Johann <observer at NOSPAM.space.pl> writes:
> I would like to write a simple CGI script to get as much info about
> installed Python as possible. But I even don't know how to check
> version of Python. :( From shell command it is easy, but how to do it
> from CGI script? Eg.
>
> #!/usr/bin/env python
import sys
> print "Content-type: text/html\n\n"
print "Python version: %s" % '.'.join([str(x) for x in sys.version_info[:3]])
or
print "Python version: %s" % sys.version
--
Sylvain Thénault
More information about the Python-list
mailing list