[IPython-user] Passing arguments to run command

Gökhan SEVER gokhansever@gmail....
Mon May 11 13:24:56 CDT 2009


Hi,

This might be might a solution for your case:

In [1]: files = !ls test*

In [2]: for i in files:
   ....:     run myScripy.py $i

However, there could be a simpler solution that I don't know of as well.

Do you have any idea how to run your script without issuing a "run" command
in front of it?

Gökhan


On Mon, May 11, 2009 at 12:46 PM, Jeremy Conlin <jeremit0@gmail.com> wrote:

> I am running a Python script from iPython with a command like
> > run myScript.py c test*.dat
>
> In the directory from which I run the command I have files named:
>
> test0.dat
> test1.dat
> ...
> test9.dat
>
> I would like all of these passed to my Python script when I issue the
> command shown above.  However this isn't happening.  Instead I get the
> string "test*.dat" passed.  Can someone show me a workaround?
>
> Thanks,
> Jeremy
>
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20090511/6f5ebc79/attachment.html 


More information about the IPython-user mailing list