optparse with numpy.array?

James Mills prologic at shortcircuit.net.au
Tue Jan 27 06:53:10 CET 2009

On Tue, Jan 27, 2009 at 3:45 PM, Johan Ekh <ekh.johan at gmail.com> wrote:
> Thank you Robert,
> but what if I just want to create an array interactively, e.g. like m  =
> array([1.0, 2.0, 3.0]), and pass it
> to my program? I tried extending optparse with a new type as explained in
> the link you gave me
> but I was not able to get it to work. Is it really neccessary follow that
> route just to pass an array?
> Lot's of people must have done this before!

Normally command line applications accept
a number of arguments which are available
in sys.argv


More information about the Python-list mailing list