mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Compatibility for IPython 3.0
This commit is contained in:
parent
53d452ae52
commit
0bb0c21dda
@ -161,6 +161,9 @@ def simple_repl(user_ns={}):
|
|||||||
def ipython(user_ns=None):
|
def ipython(user_ns=None):
|
||||||
try:
|
try:
|
||||||
import IPython
|
import IPython
|
||||||
|
try:
|
||||||
|
from traitlets.config import Config
|
||||||
|
except ImportError:
|
||||||
from IPython.config.loader import Config
|
from IPython.config.loader import Config
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return simple_repl(user_ns=user_ns)
|
return simple_repl(user_ns=user_ns)
|
||||||
@ -193,4 +196,3 @@ def ipython(user_ns=None):
|
|||||||
c.PrefilterManager.multi_line_specials = True
|
c.PrefilterManager.multi_line_specials = True
|
||||||
|
|
||||||
IPython.embed(config=c, user_ns=user_ns)
|
IPython.embed(config=c, user_ns=user_ns)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user