python version

Steven D. Majewski sdm7g at Virginia.EDU
Fri Sep 21 15:00:50 EDT 2001


On 21 Sep 2001, Trond Eivind [iso-8859-1] Glomsrød wrote:

> bobnotbob at byu.edu (Bob Roberts) writes:
> 
> > How can a python program find out what version of python it is running?
> 
> python -c 'import sys;print(sys.version[0:3])'
> 
> does it from the commandline. 

Of course, if you want to do it from the command line, you can just do:

	python -V

-- Steve






More information about the Python-list mailing list