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

Ville Vainio vivainio at gmail.com
Tue Apr 11 05:24:32 CDT 2006

On 4/10/06, Ville Vainio <vivainio at gmail.com> wrote:

> > should treat its input as pure python, but we could certainly add a switch to
> > process an input file as 'ipython source', and do so automatically for .ipy
> > extensions.
> The .ipy part was exactly what I thought myself, but I was hesitant to
> establish the ".ipy convention" at this point. Now that we have two
> independent trains of thought leading to the same station, I think we
> should do it. It'll be there this week.

Done in svn.

$ ipython hei.ipy

now runs hei.ipy as "ipython batch file". The .ipy suffix makes all
the difference.

Note that in .ipy scripts

if 1:
 print "hi"
print "hello"

Is a syntax error, you have to do it as (note the empty line):

if 1:
 print "hi"

print "hello"

Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'

More information about the IPython-user mailing list