[IPython-user] Inconsistency in "!!" ?

Ville Vainio vivainio at gmail.com
Thu Jun 22 01:43:56 CDT 2006


On 6/21/06, Asheesh Laroia <asheesh at asheesh.org> wrote:

> That worked just fine.  So can I loop through these?
>
>         In [51]: for thing in !!ls:

The "canonical" way to do this would be using an intermediate variable:

files = !ls
for thing in files:
 pass

Implementing !/!! so that they would work inside arbitrary statements
would be very complex, now it's just

variable = !rest of line

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




More information about the IPython-user mailing list