What version of python is running a script

Discussion in 'Python' started by =?iso-8859-1?Q?Fernando=20Rodr=edguez?=, Mar 7, 2006.

  1. Hi,

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

    Thanks
    =?iso-8859-1?Q?Fernando=20Rodr=edguez?=, Mar 7, 2006
    #1
    1. Advertising

  2. =?iso-8859-1?Q?Fernando=20Rodr=edguez?=

    Juho Schultz Guest

    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
    Juho Schultz, Mar 7, 2006
    #2
    1. Advertising

  3. 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?
    Cameron Laird, Mar 7, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rbt
    Replies:
    8
    Views:
    353
  2. Benjamin Rutt
    Replies:
    2
    Views:
    910
    Peter Hansen
    Dec 20, 2005
  3. V Green
    Replies:
    0
    Views:
    808
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    908
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MowGreen [MVP]
    Replies:
    5
    Views:
    1,983
    PA Bear [MS MVP]
    Feb 9, 2008
Loading...

Share This Page