problem with sys import argv

Dave Angel davea at
Tue Mar 26 21:48:36 CET 2013

On 03/26/2013 04:12 PM, Thomas 'PointedEars' Lahn wrote:
> Dave Angel wrote:
>> Since the script takes a mandatory argument, run it with one.
>> python  Dave
>> Better would be to change the script to check len(argv) for exactly 2,
>> and tell the user how he should have run it.
> I would use argparse.ArgumentParser instead.
> <>

As would I.  But that would be out of proportion of the rest of the 
code, and therefore presumably beyond the needs or interest of the OP.


More information about the Python-list mailing list