Issue
I'm trying to embed an ipython console into my command line application. I have the following:
import IPython
from traitlets.config import Config
c = Config()
c.InteractiveShellApp.exec_lines = [
'import matplotlib.pyplot as plt',
'%matplotlib',
]
return IPython.start_ipython(config=c, user_ns=globals())
However, it seems to completely ignore the "exec_lines" part since plt
is not available.
Solution
See: Can you specify a command to run after you embed into IPython?
IPython.start_ipython(config=c, user_ns=locals())
Answered By - abb
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.