[Tutor] passing named arguments through command line

Robert Sokolewicz r.sokolewicz at gmail.com
Fri Oct 31 12:14:15 CET 2014


cool, thanks guys :)

-Robert

On Thu, Oct 30, 2014 at 7:24 PM, Danny Yoo <dyoo at hashcollision.org> wrote:

>
>
> On Thu Oct 30 2014 at 7:58:32 AM Lukas Nemec <lu.nemec at gmail.com> wrote:
>
>>  Hello,
>>
>> take a look at argparse library.
>>
>
>
> Hi Robert,
>
> As Lukas mentions, it sounds like you're looking for a "flag parsing"
> library.  A flag parsing library reads a set of key/value pairs that are
> encoded in sys.argv, so they let command-line programs provide variable
> values through the use of these flags.
>
> There are a few of these flag libraries in Python due to Python's long
> history.  The one that Lukas recommends, 'argparse', is probably the one
> you want to use.
>
> You can find documentation for argparse at:
>
>     https://docs.python.org/2/howto/argparse.html#id1
>     https://docs.python.org/2/library/argparse.html
>
> Good luck!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20141031/765ff979/attachment.html>


More information about the Tutor mailing list