Issue #29 wontfix

examples only run from CLI

Mark Schafer
created an issue

The gui, helloworld, and particles examples will not run unless run from the command line. (Actually I still get an error about SDL can't load but that's a diff issue.). (I'm using Windows)

But their internal syntax makes them not possible to run from IDLE (say). I think this is a mistake.

E.g. gui.py when executed in IDLE reports: Traceback (most recent call last): File "C:\Python27\Lib\site-packages\sdl2\examples\gui.py", line 26, in <module> RESOURCES = sdl2ext.Resources(file, "resources") NameError: name 'file' is not defined

This is because the Python Shell doesn't detect current file path in file and it's related to the filepath in the line.

Perhaps use os module to get the cwd ? I really don't know what its supposed to be doing... If its just loading a file....

Comments (4)

  1. Marcus von Appen repo owner

    Did you have a chance to check the issue once more with an updated Python installation? Or was it up to date? If it was up to date already, can you provide me more details about its exact version and build type (64 or 32 bit)?

  2. Log in to comment