Advertisement
Guest User

argparse

a guest
Feb 27th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. $ ./bencode -h
  2. usage: bencode.py [-h] [-s NAME] [-i] [-n] [-p] [-l] [-r] [-t] [--max-width N]
  3. [--indent N] [-m] [--show-hits] [-g] [--graph-rule NAME]
  4. [FILE]
  5.  
  6. Parse Bencoded input
  7.  
  8. positional arguments:
  9. FILE parse the given file, if not supplied, parse stdin
  10.  
  11. optional arguments:
  12. -h, --help show this help message and exit
  13. -s NAME, --start NAME
  14. call this rule first
  15. -i, --ignore-case ignore case when matching literal termials
  16. -n, --no-skip don't call skip()
  17. -p, --profile profile the parse (cProfile), print the results
  18. -l, --list-rules print an alphabetized table of all rule names in the
  19. grammar
  20. -r, --repl start a simpl repl
  21.  
  22. tracing:
  23. -t, --trace print a trace as the parser is working
  24. --max-width N truncate the trace output at the given column, default
  25. is 78
  26. --indent N trace indent for nested calls, default is 3 spaces
  27.  
  28. memoization:
  29. -m, --memoize memoize each rule
  30. --show-hits print the number of memoization cache hits
  31.  
  32. graphviz:
  33. -g, --graph display the internal Expr tree of every rule with
  34. graphviz
  35. --graph-rule NAME display the internal Expr tree of the given rule name
  36. with graphviz (case-sensitve)
  37.  
  38. All arguments are optional. If none are supplied, parse stdin.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement