Skip to content

Conversation

jn64
Copy link

@jn64 jn64 commented Sep 14, 2025

Fixed a few minor things to make it easier to demo the examples as a curious passerby :)

This allows easy demos without prior setup, using tools that support PEP 723
inline metadata, e.g.:

    git clone <url>
    cd esper
    uv run --script examples/pyglet_example.py
Unlike pyglet.resource, pygame.image.load() and sdl2.ext.load_image() do not
search relative to the script. This caused the latter two to fail when running
from a different dir like the repo root:

    uv run --script examples/pygame_example.py # FileNotFoundError
    cd examples
    uv run --script pygame_example.py # ok

Now both cases work.
This doesn't change the benchmark, it was just annoying waiting ~0.4s for --help
to return. Now should be instant.
This also conveniently prints to stderr instead of stdout.
Return code is still 1.
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

Successfully merging this pull request may close these issues.

1 participant