##// END OF EJS Templates
Fernando Perez -
Show More
@@ -40,8 +40,6 b' import UserDict'
40 import warnings
40 import warnings
41 import glob
41 import glob
42
42
43 from sets import Set as set
44
45 def gethashfile(key):
43 def gethashfile(key):
46 return ("%02x" % abs(hash(key) % 256))[-2:]
44 return ("%02x" % abs(hash(key) % 256))[-2:]
47
45
@@ -29,7 +29,6 b' import textwrap'
29 from cStringIO import StringIO
29 from cStringIO import StringIO
30 from getopt import getopt,GetoptError
30 from getopt import getopt,GetoptError
31 from pprint import pprint, pformat
31 from pprint import pprint, pformat
32 from sets import Set
33
32
34 # cProfile was added in Python2.5
33 # cProfile was added in Python2.5
35 try:
34 try:
@@ -69,7 +68,7 b' def compress_dhist(dh):'
69 head, tail = dh[:-10], dh[-10:]
68 head, tail = dh[:-10], dh[-10:]
70
69
71 newhead = []
70 newhead = []
72 done = Set()
71 done = set()
73 for h in head:
72 for h in head:
74 if h in done:
73 if h in done:
75 continue
74 continue
@@ -143,7 +142,7 b' python-profiler package from non-free.""")'
143 filter(inst_magic,self.__dict__.keys()) + \
142 filter(inst_magic,self.__dict__.keys()) + \
144 filter(inst_bound_magic,self.__class__.__dict__.keys())
143 filter(inst_bound_magic,self.__class__.__dict__.keys())
145 out = []
144 out = []
146 for fn in Set(magics):
145 for fn in set(magics):
147 out.append(fn.replace('magic_','',1))
146 out.append(fn.replace('magic_','',1))
148 out.sort()
147 out.sort()
149 return out
148 return out
@@ -73,8 +73,6 b' __version__ = "0.2"'
73
73
74
74
75 import os,glob,fnmatch,sys,re
75 import os,glob,fnmatch,sys,re
76 from sets import Set as set
77
78
76
79 def expand(flist,exp_dirs = False):
77 def expand(flist,exp_dirs = False):
80 """ Expand the glob(s) in flist.
78 """ Expand the glob(s) in flist.
@@ -47,9 +47,6 b' import sys'
47 import tempfile
47 import tempfile
48 import traceback
48 import traceback
49 import types
49 import types
50 import warnings
51 warnings.filterwarnings('ignore', r'.*sets module*')
52 from sets import Set
53 from pprint import pprint, pformat
50 from pprint import pprint, pformat
54
51
55 # IPython's own modules
52 # IPython's own modules
@@ -1955,7 +1952,7 b' want to merge them back into the new files.""" % locals()'
1955 """
1952 """
1956 line = fn + " " + rest
1953 line = fn + " " + rest
1957
1954
1958 done = Set()
1955 done = set()
1959 while 1:
1956 while 1:
1960 pre,fn,rest = prefilter.splitUserInput(line,
1957 pre,fn,rest = prefilter.splitUserInput(line,
1961 prefilter.shell_line_split)
1958 prefilter.shell_line_split)
@@ -49,8 +49,8 b" validCommands = ['a=5',"
49 time.sleep(0.1)""",
49 time.sleep(0.1)""",
50 """from math import cos;
50 """from math import cos;
51 x = 1.0*cos(0.5)""", # Semicolons lead to Discard ast nodes that should be discarded
51 x = 1.0*cos(0.5)""", # Semicolons lead to Discard ast nodes that should be discarded
52 """from sets import Set
52 """s = 1
53 s = Set()
53 s = set()
54 """, # Trailing whitespace should be allowed.
54 """, # Trailing whitespace should be allowed.
55 """import math
55 """import math
56 math.cos(1.0)""", # Test a method call with a discarded return value
56 math.cos(1.0)""", # Test a method call with a discarded return value
General Comments 0
You need to be logged in to leave comments. Login now