Skip to content Skip to sidebar Skip to footer

Calling Command Line Arguments In Python 3

I am writing a program in Python 3 that will take data from a csv file, make adjustments to it and write the new data to a csv file that will be named by the user. I'm just trying

Solution 1:

Command line options are stored in sys.argv. You may want to check this:

http://docs.python.org/3/library/sys.html?highlight=argv#sys.argv

Beside, if you need more complex command-line argument parsing and deciding your program logic based on that, you should try argparse

Post a Comment for "Calling Command Line Arguments In Python 3"