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

instantiating App() ovverrides argparse.parse_args() #31

Open
cyberic99 opened this issue Jun 21, 2021 · 0 comments
Open

instantiating App() ovverrides argparse.parse_args() #31

cyberic99 opened this issue Jun 21, 2021 · 0 comments

Comments

@cyberic99
Copy link

For example, take this code:

#!/usr/bin/python3

import argparse
from jupylet.app import App
# app = App(width=512, height=512)

parser = argparse.ArgumentParser(description='bla')
args = parser.parse_args()

if I run:

$ ./p.py  --help

I get:

usage: p.py [-h]

bla

optional arguments:
  -h, --help  show this help message and exit

as expected.

But if I uncomment the line that instantiates app, I get:

$ ./p.py  --help

usage: p.py [-h] [--window {pyglet,glfw}] [--log_level {DEBUG,INFO,WARNING,ERROR}]

optional arguments:
  -h, --help            show this help message and exit
  --window {pyglet,glfw}
                        Windowing library to use.
  --log_level {DEBUG,INFO,WARNING,ERROR}
                        logging level.

So it makes it hard to import App outside of jupylet

Thanks

@cyberic99 cyberic99 changed the title instanciating App() ovverrides argparse.parse_args() instantiating App() ovverrides argparse.parse_args() Jun 21, 2021
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