[Python 2.7] (argparser) Using nargs raises unexpected keyword error

view full story

http://ubuntuforums.org – I'm trying to develop a program that will list available ports when a flag is set and then quit (much like -h). According to Uncle Google, the fastest way to do this is to set all other flags as optional and then check for the flag, however, when I try this I get an error from the interpuerter. My code is: Code: import serial import argparse import os parser = argparse.ArgumentParser(description="A test program for data tranmission over bluetooth using the pySerial module")                             (Hardware)