[IPython-user] questions about shell capture

Steven Bluen sbluen153@yahoo....
Sun Dec 6 17:04:30 CST 2009

I want to assign the output of a bash shell command to a list value in IPython. But when I try it, I get this error.

In [13]: a[1]=!ls


   File "<ipython console>", line 1



SyntaxError: invalid syntax

This statement doesn't work either:


But this one does work:


Can someone please explain how to get the other statements to work?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20091206/f6198aa2/attachment.html 

More information about the IPython-user mailing list