29 lines
985 B
Diff
29 lines
985 B
Diff
|
Source: Hoshpak/upstream
|
||
|
Upstream: partial
|
||
|
Reason: compatibility of the remaining code with python3
|
||
|
--- gnucash/python/pycons/ishell.py 2018-09-27 12:30:44.136631542 +0200
|
||
|
+++ gnucash/python/pycons/ishell.py 2018-09-27 12:46:51.636875378 +0200
|
||
|
@@ -16,11 +16,10 @@
|
||
|
import os
|
||
|
import sys
|
||
|
import re
|
||
|
-from StringIO import StringIO
|
||
|
try:
|
||
|
import IPython
|
||
|
- from IPython import ipapi
|
||
|
-except Exception,e:
|
||
|
+ from IPython.core import interactiveshell
|
||
|
+except Exception as e:
|
||
|
raise "Error importing IPython (%s)" % str(e)
|
||
|
|
||
|
|
||
|
@@ -54,7 +53,7 @@
|
||
|
header='IPython system call: ',
|
||
|
verbose=self.IP.rc.system_verbose)
|
||
|
# Get a hold of the public IPython API object and use it
|
||
|
- self.ip = ipapi.get()
|
||
|
+ self.ip = interactiveshell.get_ipython()
|
||
|
self.ip.magic('colors LightBG')
|
||
|
sys.excepthook = excepthook
|
||
|
self.iter_more = 0
|