mirror of
https://github.com/kennethreitz-archive/plac.git
synced 2026-06-05 15:40:17 +00:00
14 lines
313 B
Python
14 lines
313 B
Python
# example11.py
|
|
import plac
|
|
from annotations import Positional
|
|
|
|
@plac.annotations(
|
|
i=Positional("This is an int", int),
|
|
n=Positional("This is a float", float),
|
|
rest=Positional("Other arguments"))
|
|
def main(i, n, *rest):
|
|
print(i, n, rest)
|
|
|
|
if __name__ == '__main__':
|
|
import plac; plac.call(main)
|