I have such script:
import argparse
parser = argparse.ArgumentParser(
description=\'Text file conversion.\'
)
parser.add_arg
Namespace objects aren't iterable, the standard docs suggest doing the following if you want a dictionary:
>>> vars(args)
{'foo': 'BAR'}
So
for key,value in vars(args).iteritems():
# do stuff
To be honest I'm not sure why you want to iterate over the arguments. That somewhat defeats the purpose of having an argument parser.