[IPython-user] Running ipython from shell with pylab
Gökhan SEVER
gokhansever@gmail....
Fri May 8 16:59:58 CDT 2009
Hello,
I would like write a simple script which will be called from a Bash shell,
and initiate an IPython matplotlib enabled session, and will run an external
file as is supplied in command argument within the same session.
A simple demonstration:
1- plot m.py
2- start an Ipython with pylab
3- run the m.py script
4- show figure(s)
5- maintain namespace and stay inside the Ipython
I have written a few lines which doesn't work the way I want it to be as
given below:
#!/usr/bin/env python
from sys import argv
argv.insert(2,'--pylab')
import IPython
ipython = IPython.Shell.start()
ip = IPython.ipapi.get()
ip.IP.magic_run(argv[1])
ipython.mainloop()
for some reason the external file isn't run :(
Could you please help me on this issue?
Thank you
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20090508/79b44016/attachment.html
More information about the IPython-user
mailing list