Last active 1491687765

firetest.py Raw
1#!/usr/bin/env python3.6
2import fire # pypi.python.org/pypi/fire
3
4class Example:
5 def hello(self, name="world"):
6 """Testing"""
7 return f"Hello {name}!"
8
9def main():
10 fire.Fire(Example)
11
12if __name__ == "__main__":
13 main()
zOut.txt Raw
1$ python3 firetest.py
2Type: Example
3String form: <__main__.Example object at 0x1028cf470>
4File: ~/firetest.py
5
6Usage: firetest.py
7 firetest.py hello
8
9$ python3 firetest.py hello
10Hello world!
11
12$ python3 firetest.py hello there
13Hello there!