Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > What version of python is running a script

Reply
Thread Tools

What version of python is running a script

 
 
=?iso-8859-1?Q?Fernando=20Rodr=edguez?=
Guest
Posts: n/a
 
      03-07-2006

Hi,

How can my script tell which version of python is running it?

Thanks


 
Reply With Quote
 
 
 
 
Juho Schultz
Guest
Posts: n/a
 
      03-07-2006
Fernando Rodríguez wrote:
>
> Hi,
>
> How can my script tell which version of python is running it?
>
> Thanks
>
>


import sys
# examine these variables
sys.version_info
sys.version
 
Reply With Quote
 
 
 
 
Cameron Laird
Guest
Posts: n/a
 
      03-07-2006
In article <> ,
Fernando Rodríguez <> 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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
modify a long-running python script while it is running? Benjamin Rutt Python 2 12-20-2005 01:42 PM
check interpreter version before running script rbt Python 8 04-06-2005 01:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57