chriskiehl / Gooey

Turn (almost) any Python command line program into a full GUI application with one line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

convert regular ArgumentParser to GooeyParser?

khavernathy opened this issue · comments

Can you pass a conventional argparse parser into GooeyParser?

I want to convert an existing ArgumentParser to a GooeyParser without duplicating code.

commented

GooeyParser is, for the most part, a drop-in replacement of Argparser. It's a superset of the API. So, you can freely sub one for the other without changing any of your core code.

With ArgumentParser

parser = ArgumentParser(description="My Cool GUI Program!") 
parser.add_argument('Filename')
parser.add_argument('Date')

With GooeyParser

parser = GooeyParser(description="My Cool GUI Program!") 
parser.add_argument('Filename')
parser.add_argument('Date')

thanks