Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Documentation and Feature Update

Compare
Choose a tag to compare
@tuxlife tuxlife released this 27 Aug 16:57
· 39 commits to master since this release
  • add a example script (example.py) with all functions
  • add yaml-output support
with OutputFormat('yaml'):
    print_table('id name'.split(), [{'id': 1, 'name': 'Test #1'}, {'id': 2, 'name': 'Test #2'}])
id: 1
name: 'Test #1'
---
id: 2
name: 'Test #2'
  • add warning(msg) and ok(msg) for class Action
with Action('Calc 1 + 1..') as act:
    act.ok(1+1)

with Action('Oh, I make a warning..') as act:
    act.warning('work is complicated')
Calc 1 + 1.. 2
Oh, I make a warning.. work is complicated
  • add default for choice
state = choice('Please select the state of your work', ['Done', 'In Progress', 'unknown', 'lost'], default='lost'
Please select the state of your work
1) Done
2) In Progress
3) unknown
4) lost
Please select (1-4) [4]: