File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class is designed to launch commands on Sun Grid Engine clusters.
5252
5353__version__ = "2013.11.2"
5454
55- import os , subprocess
55+ import os , sys , subprocess
5656import param
5757
5858from lancet .core import * # pyflakes:ignore (appropriate import)
@@ -133,6 +133,10 @@ def load_ipython_extension(ip):
133133 global _loaded
134134 if not _loaded :
135135 _loaded = True
136+ from lancet import launch
137+ if sys .version_info [0 ] == 2 :
138+ launch .input = lambda * args , ** kwargs : raw_input (* args , ** kwargs )
139+
136140 plaintext_formatter = ip .display_formatter .formatters ['text/plain' ]
137141 plaintext_formatter .for_type (Args , repr_pretty_annotated )
138142 plaintext_formatter .for_type (Command , repr_pretty_unannotated )
Original file line number Diff line number Diff line change @@ -185,7 +185,6 @@ def __next__(self):
185185 """
186186 raise StopIteration
187187
188- # Python 2 support
189188 next = __next__
190189
191190 def copy (self ):
@@ -332,6 +331,8 @@ def __next__(self):
332331 self ._exhausted = True
333332 return self .specs
334333
334+ next = __next__
335+
335336 def _unique (self , sequence , idfun = repr ):
336337 """
337338 Note: repr() must be implemented properly on all objects. This
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ def __next__(self):
7474 self ._next_val = StopIteration
7575 return current_val
7676
77- # Python 2 support
7877 next = __next__
7978
8079
@@ -319,7 +318,6 @@ def __next__(self):
319318 else :
320319 return next (self .second )
321320
322- # Python 2 support
323321 next = __next__
324322
325323
@@ -364,3 +362,4 @@ def __next__(self):
364362 else :
365363 second_spec = next (self .second )
366364 return self ._cartesian_product (self ._first_cached , second_spec )
365+ next = __next__
You can’t perform that action at this time.
0 commit comments