Can one force a newline in the epilog of Argparse help?

1,791 views
Skip to first unread message

Peter Simon

unread,
Apr 4, 2015, 5:50:03 PM4/4/15
to julia...@googlegroups.com
I'm using the remarkable Argparse package, and in the help epilog, I would like to include several examples of calling the program, with each example separated from its predecessor by a newline.  Is this possible?  For example, if the user types `myprog -h`, then at the end of the help output I would like something along the lines:


Example 1:  "myprog arg1 arg2 --flag1 --opt1 5"  does 
lots of good stuff.

Example 2:  "myprog arg1  --opt2 0"  does something
completely different.


Right now I get instead the following, where the lines are all automatically wrapped:

Example 1:  "myprog arg1 arg2 --flag1 --opt1 5"  does 
lots of good stuff.  Example 2:  "myprog arg1  --opt2 0"  
does something completely different.


Is there some way to force a newline within the epilog text string?

Thanks in advance,
--Peter

Carlo Baldassi

unread,
Apr 7, 2015, 1:51:38 PM4/7/15
to julia...@googlegroups.com
There is currently no way to do what you want, but I'd like to add this feature. I'm just unsure what the best/simplest API would be.

Cold you open an issue about it in ArgParse.jl in the meanwhile?

Peter Simon

unread,
Apr 7, 2015, 3:50:45 PM4/7/15
to julia...@googlegroups.com
Opened issue 12.

Thanks,
--Peter
Reply all
Reply to author
Forward
0 new messages