Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can a script decorated with gooey be invoked without gooey? #883

Closed
Zenahr opened this issue Jun 26, 2023 · 1 comment
Closed

Comments

@Zenahr
Copy link

Zenahr commented Jun 26, 2023

We have linux users who'd like to invoke a script as is (CLI) and we got Windows users who'd like to use the GUI that comes with the gooey decorator.

Is there an option/a way to make the script run as GUI if no arguments are passed and run as CLI if arguments are passed?

@Zenahr
Copy link
Author

Zenahr commented Jun 27, 2023

Solved.

from app import main
from gooey import Gooey

# Decorator providing the GUI functionality
@Gooey()
def gui_main():
    main()

if __name__== "__main__" :
    gui_main()

@Zenahr Zenahr closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant