[Assorted-commits] SF.net SVN: assorted:[1881] configs/trunk/src/pythonrc.py
Brought to you by:
yangzhang
From: <yan...@us...> - 2014-04-16 21:27:23
|
Revision: 1881 http://sourceforge.net/p/assorted/svn/1881 Author: yangzhang Date: 2014-04-16 21:27:21 +0000 (Wed, 16 Apr 2014) Log Message: ----------- Fix pythonrc to tolerate ipython Modified Paths: -------------- configs/trunk/src/pythonrc.py Modified: configs/trunk/src/pythonrc.py =================================================================== --- configs/trunk/src/pythonrc.py 2014-03-23 08:45:53 UTC (rev 1880) +++ configs/trunk/src/pythonrc.py 2014-04-16 21:27:21 UTC (rev 1881) @@ -1,7 +1,11 @@ -from __future__ import ( generators, with_statement ) import os, sys -#from cStringIO import * +from cStringIO import * from itertools import * -import readline, rlcompleter -readline.parse_and_bind( 'tab: complete' ) +try: get_ipython +except NameError: in_ipython = False +else: in_ipython = True + +if not in_ipython: + import readline, rlcompleter + readline.parse_and_bind( 'tab: complete' ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |