I know get values from argsparse like:
parser.add_argument('--volume', help='Ejecuta una aplicacion cualquiera')
Also I know if the argument is True or False with this:
parser.add_argument('--getVolume', action='store_true', help='Ejecuta una aplicacion cualquiera')
But I don't Know use both some time, because I want use the argument like getter-setter. For example if I dont write a number the program return the current volume and if I write a number the app set this volume to the robot.
python app.py --volume # Return the current volume
python app.py --volume 80 # Set the volume to the 80%
Thank you very much,
Carlos.