What version of python is running a script

Cameron Laird claird at lairds.us
Tue Mar 7 11:08:03 EST 2006


In article <a33bd841ffe78c81017243bdd70 at news.supernews.com>,
Fernando Rodríguez  <frr at easyjob.net> wrote:
>
>Hi,
>
>How can my script tell which version of python is running it?
			.
			.
			.
  $ python
  Python 2.3.5 (#2, Aug 30 2005, 15:50:26) 
  [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import sys
  >>> print sys.version
  2.3.5 (#2, Aug 30 2005, 15:50:26) 
  [GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)]

'Does that make it clear?



More information about the Python-list mailing list