mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge Chris Mayo's iPython-fixes into maint.
This commit is contained in:
commit
3b381f25c3
@ -16,12 +16,11 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import re
|
import re
|
||||||
from StringIO import StringIO
|
from io import StringIO
|
||||||
try:
|
try:
|
||||||
import IPython
|
import IPython
|
||||||
from IPython import ipapi
|
except Exception as e:
|
||||||
except Exception,e:
|
raise Exception("Error importing IPython (%s)" % str(e))
|
||||||
raise "Error importing IPython (%s)" % str(e)
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------ class Shell
|
# ------------------------------------------------------------------ class Shell
|
||||||
@ -54,11 +53,11 @@ class Shell:
|
|||||||
header='IPython system call: ',
|
header='IPython system call: ',
|
||||||
verbose=self.IP.rc.system_verbose)
|
verbose=self.IP.rc.system_verbose)
|
||||||
# Get a hold of the public IPython API object and use it
|
# Get a hold of the public IPython API object and use it
|
||||||
self.ip = ipapi.get()
|
self.ip = IPython.core.getipython.get_ipython()
|
||||||
self.ip.magic('colors LightBG')
|
self.ip.magic('colors LightBG')
|
||||||
sys.excepthook = excepthook
|
sys.excepthook = excepthook
|
||||||
self.iter_more = 0
|
self.iter_more = 0
|
||||||
self.complete_sep = re.compile('[\s\{\}\[\]\(\)]')
|
self.complete_sep = re.compile(r'[\s\{\}\[\]\(\)]')
|
||||||
|
|
||||||
|
|
||||||
def namespace(self):
|
def namespace(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user