def enable_automatic_int_sympification(app):
 hasshell = hasattr(app, 'shell')
 import ast
 if hasshell:
  old_run_cell = app.shell.run_cell
 else:
  old_run_cell = app.run_cell
 def my_run_cell(cell, *args, **kwargs):
  try:
   ast.parse(cell)
  except SyntaxError:
   pass
  else:
   cell = int_to_Integer(cell)
  old_run_cell(cell, *args, **kwargs)
 if hasshell:
  app.shell.run_cell = my_run_cell
 else:
  app.run_cell = my_run_cell

def enable_automatic_int_sympification ( app ) : hasshell = hasattr ( app , 'shell' ) import ast if hasshell : old_run_cell = app . shell . run_cell else : old_run_cell = app . run_cell def my_run_cell ( cell , * args , ** kwargs ) : try : ast . parse ( cell ) except SyntaxError : pass else : cell = int_to_Integer ( cell ) old_run_cell ( cell , * args , ** kwargs ) if hasshell : app . shell . run_cell = my_run_cell else : app . run_cell = my_run_cell
allow ipython to automatically convert integer literals to integer .