[IPython-User] running "ipython myscript.py"

Alan Wilter Sousa da Silva awilter@ebi.ac...
Thu Mar 10 09:03:58 CST 2011


Thanks Paul,

Indeed, using #!/usr/bin/env ipython and it worked nicely.

Cheers,

Alan

On 9 March 2011 21:33, Paul Ivanov <pivanov314@gmail.com> wrote:

> Alan Wilter Sousa da Silva, on 2011-03-09 11:45,  wrote:
> > Thanks Paul,
> >
> > And how to make my script executable? I mean I tried to put in my
> test.ipy:
> >
> > #!/sw/arch/bin/ipython
> >
> > then:
> >
> > chmod +x test.ipy
> >
> > but
> >
> > ./test.ipy
> >
> > won't work.
>
> Hi Alan,
>
> what is the error message? Doing the equivalent worked for me on
> the current 0.10.2 git branch using python 2.6.5 (with a
> deprecation warning about os.popen3). Try this simple three line
> program and see if that works for you.
>
> $ cat tmp.ipy
> #!/usr/bin/env ipython
> message = !echo it works.
> print message
> $ ./tmp.ipy
> /home/pi/tmp/local/lib/python2.6/site-packages/IPython/genutils.py:437:
> DeprecationWarning: os.popen3 is deprecated.  Use the subprocess
> module.  pin,pout,perr = os.popen3(cmd)
> ['it works.']
>
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists,  off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk138hkACgkQe+cmRQ8+KPctDQCfRem21/Ou8EcrT/9Ix/jUM+Ys
> XB8An2BPU5xhvC1tgq1lS23PK5owhlm+
> =v3rA
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>


-- 
Alan Wilter SOUSA da SILVA, D.Sc.
Bioinformatician, UniProt - PANDA, EBI-EMBL
CB10 1SD, Hinxton, Cambridge, UK
+44 1223 49 4588
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110310/11b1d9ee/attachment.html 


More information about the IPython-User mailing list