##// END OF EJS Templates
check for set (python 2.3 compatibility). Closes #209
vivainio -
Show More
@@ -9,6 +9,10 b' try:'
9 sorted
9 sorted
10 except NameError:
10 except NameError:
11 from ipipe import sorted
11 from ipipe import sorted
12 try:
13 set
14 except:
15 from sets import Set as set
12
16
13
17
14 __all__ = ["igrid"]
18 __all__ = ["igrid"]
@@ -14,6 +14,11 b' import inspect'
14 from time import time
14 from time import time
15 ip = IPython.ipapi.get()
15 ip = IPython.ipapi.get()
16
16
17 try:
18 set
19 except:
20 from sets import Set as set
21
17 TIMEOUT_STORAGE = 3 #Time in seconds after which the rootmodules will be stored
22 TIMEOUT_STORAGE = 3 #Time in seconds after which the rootmodules will be stored
18 TIMEOUT_GIVEUP = 20 #Time in seconds after which we give up
23 TIMEOUT_GIVEUP = 20 #Time in seconds after which we give up
19
24
@@ -54,6 +54,10 b' from enthought.traits import api as T'
54 # IPython imports
54 # IPython imports
55 from IPython.ipapi import TryNext, get as ipget
55 from IPython.ipapi import TryNext, get as ipget
56 from IPython.genutils import dir2
56 from IPython.genutils import dir2
57 try:
58 set
59 except:
60 from sets import Set as set
57
61
58 #############################################################################
62 #############################################################################
59 # Module constants
63 # Module constants
@@ -5,7 +5,7 b' General purpose utilities.'
5 This is a grab-bag of stuff I find useful in most programs I write. Some of
5 This is a grab-bag of stuff I find useful in most programs I write. Some of
6 these things are also convenient when working at the command line.
6 these things are also convenient when working at the command line.
7
7
8 $Id: genutils.py 2888 2007-12-12 17:20:42Z vivainio $"""
8 $Id: genutils.py 2937 2008-01-16 15:25:59Z vivainio $"""
9
9
10 #*****************************************************************************
10 #*****************************************************************************
11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -42,6 +42,12 b' from path import path'
42 if os.name == "nt":
42 if os.name == "nt":
43 from IPython.winconsole import get_console_size
43 from IPython.winconsole import get_console_size
44
44
45 try:
46 set
47 except:
48 from sets import Set as set
49
50
45 #****************************************************************************
51 #****************************************************************************
46 # Exceptions
52 # Exceptions
47 class Error(Exception):
53 class Error(Exception):
General Comments 0
You need to be logged in to leave comments. Login now