Re: [Tutor] passing named arguments through command line

2014-10-31 Thread Robert Sokolewicz
cool, thanks guys :) -Robert On Thu, Oct 30, 2014 at 7:24 PM, Danny Yoo wrote: > > > On Thu Oct 30 2014 at 7:58:32 AM Lukas Nemec wrote: > >> Hello, >> >> take a look at argparse library. >> > > > Hi Robert, > > As Lukas mentions, it sounds like you're looking for a "flag parsing" > library.

[Tutor] passing named arguments through command line

2014-10-30 Thread Robert Sokolewicz
I have a function with optional arguments x, y and I would like to pass y or z using a named variable through the command line. Inside a python script main(y=3) would work, but I have trouble passing y=3 as an argument in command line. I have tried the following: import sys def main(x=1, y=