parsing - Python Command Args - Stack Overflow
stackoverflow.com › questions › 17934149As you are manipulating directly args Namespace object as if it were a dictionnary, it raises a . TypeError: 'Namespace' object is not subscriptable My quick, personnal and ugly workaround is to access to the internal dict using internal __dict__ type . user_args = args.__dict__. This is quite usefull if you need to iterate over the arguments and filter it