[IPython-User] Pipe into file
Richard Parsons
richard.lee.parsons@gmail....
Thu Jul 15 10:49:40 CDT 2010
Thanks for that :)
On Thu, 15 Jul 2010, Max Bane wrote:
> The standard Python print statement supports something like this (not sure about Python 3.0, though).
> In [1]: f = open('test.txt', 'w')
>
> In [2]: print >> f, 'hello, world'
>
> In [3]: f.close()
>
> In [4]: !cat test.txt
> hello, world
>
>
> On Thu, Jul 15, 2010 at 6:00 AM, Richard Parsons <richard.lee.parsons@gmail.com> wrote:
> How do I pipe the output into a file?
>
> I want to do this, but it doesn't work...
>
> print variable > some_filename
>
> Thanks,
> Richard
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
>
>
> --
> Max Bane
> PhD Student, Linguistics
> University of Chicago
> bane@uchicago.edu
>
>
More information about the IPython-User
mailing list