(app: Application)
| 37 | |
| 38 | |
| 39 | def parse_command_line(app: Application): |
| 40 | parser = QCommandLineParser() |
| 41 | try: |
| 42 | parse(app, parser) |
| 43 | except CommandLineError as exc: |
| 44 | print(f"Error: {str(exc)}\n", file=sys.stderr) |
| 45 | print(parser.helpText()) |
| 46 | sys.exit(1) |
| 47 | |
| 48 | def is_url(path: str) -> bool: |
| 49 | parsed = urllib.parse.urlparse(path) |