[IPython-user] running ipython from command line with pysh profile does not work

Krishna Mohan Gundu gkmohan at gmail.com
Sun Apr 9 17:04:39 CDT 2006

NOTE: I accidentally missed to reply the message to the newsgroup. If
someone is looking for a solution to the problem I raised, here is

> ipython -c "_ip.runlines(open('test.ipy').read())"
> where test.ipy is the batch file.

Thanks Ville. I dont have the current build version but I read the
ipython doc and got it to work as follows.


from IPython.Shell import IPShellEmbed
ipshell = IPShellEmbed(['-p','pysh','-automagic'], banner = 'Entering
IPython Interpreter',
                            exit_msg = 'Exiting IPython Interpreter');
ipshell(dummy = 1);

import sys, os
if len(sys.argv) > 1 and os.path.exists(sys.argv[1]) :

chmod 744 runipy
runipy myjob.ipy


More information about the IPython-user mailing list