easyargs
easyargs copied to clipboard
A python module to make handling command line arguments easy
Mock has been available in the standard library since Python 3.3. There is no need to install the pypi package on modern Pythons.
I noticed this package in Fedora was failing to rebuild with Python 3.11. `inspect.getargspec` has been removed. `inspect.getfullargspec` is the updated API, but returns a tuple with more properties. With...
Using this example: ```python import easyargs @easyargs class Foo(object): """This is some help""" def foo(self): pass def bar(self, baz): pass Foo() ``` Calling this from either Python 2.7 or 3.6...
To make using easyargs easier to test, it should be possible to pass in the arguments that the parser should use and fallback to sys.argv if they are not supplied.
The git_clone example - with the needed print() change (ok, maybe giveaway that it wasn't designed for python3 :) but the other options stuff does work!) 'git_clone.py -h' does not...
In order to handle really specialised cases and to allow a smooth switch from easyargs to argparse, it should be possible to supply an argparse class as a default option....
It would be nice to be able to add global options to class based parsers. Need to think about how to do it (probably means adding a specially named function...
Updated Python to 3.12 and am not getting this error on import: ``` File "/home/sveder/.local/lib/python3.12/site-packages/easyargs/decorators.py", line 12, in decorated parsers.function_parser(f, parser) File "/home/sveder/.local/lib/python3.12/site-packages/easyargs/parsers.py", line 108, in function_parser args, varargs, keywords,...