Which Python Version

Tim Golden mail at timgolden.me.uk
Wed Jul 4 06:35:38 EDT 2007


Robert Rawlins - Think Blue wrote:
> Is there a command I can run to confirm which version of python I'm running?

 From outside Python:

   python -V

(that's a capital V)

 From inside Python:

   import sys
   print sys.version

(and a couple of more easily parseable alternatives; look at the sys module docs)

TJG



More information about the Python-list mailing list