You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import argh
def foo():
"This is my function"
print("Hello world!")
If I run this app with python bar.py -h the output I will get will be:
usage: bar.py [-h] {foo} ...
positional arguments:
{foo}
foo This is my function
How do I provide added instructions so that when I run python bar.py foo -h, I can get output like so:
usage: bar.py foo [-h]
This is my function
1) this is my added instruction specifically when calling this command
2) this is my 2nd added instruction when calling this command
3) These commands will only be shown when running {command} -h
When I add the instructions like so:
def foo():
'''
This is my function
1) this is my added instruction specifically when calling this command
2) this is my 2nd added instruction when calling this command
3) These commands will only be shown when running {command} -h
'''
print("Hello world!")
It outputs the entire instructions when running python bar.py -h .
The text was updated successfully, but these errors were encountered:
Say I have the following:
If I run this app with
python bar.py -h
the output I will get will be:How do I provide added instructions so that when I run
python bar.py foo -h
, I can get output like so:When I add the instructions like so:
It outputs the entire instructions when running
python bar.py -h
.The text was updated successfully, but these errors were encountered: