mirror of https://github.com/chriskiehl/Gooey.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
426 B
24 lines
426 B
from argparse import ArgumentParser
|
|
|
|
from gooey import Events, Gooey
|
|
|
|
|
|
with open('tmp.txt', 'w') as f:
|
|
import sys
|
|
f.write(str(sys.argv))
|
|
|
|
def make_parser():
|
|
parser = ArgumentParser()
|
|
parser.add_argument('foo', type=int)
|
|
return parser
|
|
|
|
@Gooey(use_events=[Events.VALIDATE_FORM])
|
|
def main():
|
|
parser = make_parser()
|
|
print(parser.parse_args())
|
|
print('DONE')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|
|
|