Tag: sys.argv

getopt – command line arguments in Python [Part 2]

getopt – command line arguments in Python [Part 2]

In the last article we learnt how to handle command line arguments in Python using sys.argv. We also noticed that it is not the ideal solution if your use case is a bit more complex. Now let’s see getopt,- a python module which builds on sys.argv. getopt provides us with […]

sys.argv – command line arguments in Python [Part 1]

sys.argv – command line arguments in Python [Part 1]

In the programming world, an expression often comes across that “a problem can be solved in many different ways”. Hence the programmer has to decide which solution is best for him/her.  Same holds true if you want to process Command Line Arguments (CLA) in Python. There can be many options […]