[IPython-dev] what goes wrong with %%file

W. Trevor King wking at tremily.us
Wed May 15 16:18:44 EDT 2013


On Wed, May 15, 2013 at 01:09:59PM -0700, MinRK wrote:
> With the exception of `%%cat file.txt`, since a cell magic that
> *reads* a file doesn't make sense.

I think this argument sinks the whole `%%cat` idea.  The fact that
`%%cat` is sometimes used to write files is due to shell redirection,
not something inherent in the `cat` command (writing files with
“concatenate”?).  It's a good thing we can't have spaces in magic
names, so I can't suggest the amusing `%%cat >$FILENAME <<EOF` syntax
;).

Chuckles,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130515/dae7d77e/attachment.sig>


More information about the IPython-dev mailing list