New features (closes #6):
- config file selection (---config PATH) - dump state as executable command (---dump) - over library desciption (---help) - finished automatic --help view Fixes - callbacks are called after the application's state is determined (closes #9) - many small fixes
This commit is contained in:
parent
5b983a3131
commit
ed947bf8e6
5 changed files with 187 additions and 49 deletions
9
test.py
9
test.py
|
@ -37,10 +37,5 @@ if __name__ == "__main__":
|
|||
main.add_option("int-quad", "", int4, [45, 72, 97, 18], abbr="i", count=4)
|
||||
main.add_option("int-quad-multi", "", int4, [45, 72, 97, 18], abbr="I", count=4, overwrite=False)
|
||||
main.add_doc("Description", ["What it does.", "Another paragraph."])
|
||||
main.parse()
|
||||
|
||||
for option in main.options.values():
|
||||
if option.name not in ["help", "-help"]:
|
||||
main.print("option <g>%s<.> = %s" %(option.name, option.value))
|
||||
|
||||
main.print("<m>targets<.>: %s" %(main.targets))
|
||||
main.add_doc("Moar", ["When we launched Raspberry Pi Zero last November, it’s fair to say we were <W>blindsided<.> by the level of demand. We immediately sold every copy of MagPi issue 40 and every Zero in stock at our distributors; and every time a new batch of Zeros came through from the factory they’d sell out in minutes. To complicate matters, Zero then had to compete for factory space with Raspberry Pi 3, which was ramping for launch at the end of February.", "To connect the camera to the Zero, we offer a custom six-inch adapter cable. This converts from the fine-pitch connector format to the coarser pitch used by the camera board. Liz has a great picture of Mooncake, the official Raspberry Pi cat, attempting to eat the camera cable. She won’t let me use it in this post so that you aren’t distracted from the pictures of the new Zero itself. I’ve a feeling she’ll be tweeting it later today."])
|
||||
main.setup()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue