##// END OF EJS Templates
changes for ironpython
Pawel Jasinski -
Show More
@@ -25,6 +25,9 b' from __future__ import print_function'
25
25
26 import __builtin__
26 import __builtin__
27
27
28 import sys
29
30
28 from IPython.config.configurable import Configurable
31 from IPython.config.configurable import Configurable
29 from IPython.utils import io
32 from IPython.utils import io
30 from IPython.utils.traitlets import Instance, List
33 from IPython.utils.traitlets import Instance, List
@@ -266,5 +269,7 b' class DisplayHook(Configurable):'
266 self.shell.user_ns.update({'_':None,'__':None, '___':None})
269 self.shell.user_ns.update({'_':None,'__':None, '___':None})
267 import gc
270 import gc
268 # TODO: Is this really needed?
271 # TODO: Is this really needed?
269 gc.collect()
272 # IronPython blocks here forever
273 if sys.platform != "cli":
274 gc.collect()
270
275
@@ -927,11 +927,15 b' else:'
927 def validate(self, obj, value):
927 def validate(self, obj, value):
928 if isinstance(value, int):
928 if isinstance(value, int):
929 return value
929 return value
930 elif isinstance(value, long):
930 if isinstance(value, long):
931 # downcast longs that fit in int:
931 # downcast longs that fit in int:
932 # note that int(n > sys.maxint) returns a long, so
932 # note that int(n > sys.maxint) returns a long, so
933 # we don't need a condition on this cast
933 # we don't need a condition on this cast
934 return int(value)
934 return int(value)
935 if sys.platform == "cli":
936 from System import Int64
937 if isinstance(value, Int64):
938 return int(value)
935 self.error(obj, value)
939 self.error(obj, value)
936
940
937
941
General Comments 0
You need to be logged in to leave comments. Login now