##// END OF EJS Templates
Do not crash when running w/o readline
vivainio -
Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6
6
7 This file contains all the classes and helper functions specific to IPython.
7 This file contains all the classes and helper functions specific to IPython.
8
8
9 $Id: iplib.py 2225 2007-04-08 02:48:16Z jdh2358 $
9 $Id: iplib.py 2243 2007-04-16 16:03:00Z vivainio $
10 """
10 """
11
11
12 #*****************************************************************************
12 #*****************************************************************************
@@ -1480,8 +1480,11 b' want to merge them back into the new files.""" % locals()'
1480 SyntaxError exception, don't try to analyze the stack manually and
1480 SyntaxError exception, don't try to analyze the stack manually and
1481 simply call this method."""
1481 simply call this method."""
1482
1482
1483
1483 # Though this won't be called by syntax errors in the input line,
1484 # Though this won't be called by syntax errors in the input line,
1484 # there may be SyntaxError cases whith imported code.
1485 # there may be SyntaxError cases whith imported code.
1486
1487
1485 if exc_tuple is None:
1488 if exc_tuple is None:
1486 etype, value, tb = sys.exc_info()
1489 etype, value, tb = sys.exc_info()
1487 else:
1490 else:
@@ -1506,6 +1509,7 b' want to merge them back into the new files.""" % locals()'
1506 # pdb mucks up readline, fix it back
1509 # pdb mucks up readline, fix it back
1507 self.set_completer()
1510 self.set_completer()
1508
1511
1512
1509 def mainloop(self,banner=None):
1513 def mainloop(self,banner=None):
1510 """Creates the local namespace and starts the mainloop.
1514 """Creates the local namespace and starts the mainloop.
1511
1515
@@ -1997,6 +2001,7 b' want to merge them back into the new files.""" % locals()'
1997
2001
1998 # Code run by the user may have modified the readline completer state.
2002 # Code run by the user may have modified the readline completer state.
1999 # We must ensure that our completer is back in place.
2003 # We must ensure that our completer is back in place.
2004 if self.has_readline:
2000 self.set_completer()
2005 self.set_completer()
2001
2006
2002 try:
2007 try:
General Comments 0
You need to be logged in to leave comments. Login now