Skip to content

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

Description

@cyberic99

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions