nir / jupylet

Python game programming in Jupyter notebooks.

Home Page:https://jupylet.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

instantiating App() ovverrides argparse.parse_args()

cyberic99 opened this issue · comments

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