Skip to content

Commit

Permalink
[py] --version
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Sep 30, 2023
1 parent 0d62dca commit b68d802
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion py/py_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ else
python3 -m venv $BUILDDIR
$BUILDDIR/bin/pip install pysdl2 pysdl2-dll 'mypy>=1.0.0' black
fi
echo "Using Python3 in $BUILDDIR"
# echo "Using Python3 in $BUILDDIR"
PATH="$BUILDDIR/bin:$PATH"
fi
2 changes: 2 additions & 0 deletions py/src/args.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import typing as t
import argparse
import sys


def parse_args(args: t.List[str]) -> argparse.Namespace:
Expand All @@ -14,6 +15,7 @@ def parse_args(args: t.List[str]) -> argparse.Namespace:
parser.add_argument("-H", "--headless", action="store_true", default=False)
parser.add_argument("-S", "--silent", action="store_true", default=False)
parser.add_argument("-t", "--turbo", action="store_true", default=False)
parser.add_argument("-v", "--version", action="version", version=sys.version)
parser.add_argument(
"-f",
"--frames",
Expand Down
7 changes: 6 additions & 1 deletion py/src/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env python3

import sdl2
import warnings

with warnings.catch_warnings():
warnings.simplefilter("ignore")
import sdl2

import sys
from typing import List

Expand Down

0 comments on commit b68d802

Please sign in to comment.