[IPython-user] Running iPython .8.3 with Python 2.3 on Windows

Pete Forman pete.forman@westerngeco....
Fri May 30 03:21:22 CDT 2008

"Ville M. Vainio" <vivainio@gmail.com> writes:
 > On Fri, May 30, 2008 at 9:35 AM, Fernando Perez
 > <fperez.net@gmail.com> wrote:
>> But certainly if there's a genuine need for 2.3 still out there, we
>> can try to accomodate.  Voices?
 > I just added the 'set' import to Shell.py now.
 > For trivial stuff like this, it's no problem to support 2.3. We
 > just need someone using 2.3 regularly testing the trunk, just to be
 > sure.

Here's a snippet that I've used to enable set in older pythons.

try: set([2,1])
except NameError:
    # The set builtin is new in Python 2.4.  This statement is for compatability
    # with Python 2.3 / Jython 2.2.  Python 2.2 works with a sets.py from 2.3.2.
    from sets import Set as set, ImmutableSet as frozenset

Pete Forman                -./\.-  Disclaimer: This post is originated
WesternGeco                  -./\.-   by myself and does not represent
pete.forman@westerngeco.com    -./\.-   the opinion of Schlumberger or
http://petef.22web.net           -./\.-   WesternGeco.

More information about the IPython-user mailing list