Closed Zuzu-Typ closed 6 years ago
Updated to pyGLFW 1.6
I have merged your code locally and fixed a few issues. I've pushed it into a new feature branch for now, as there's a problem with the idea of automatically pythonifying the names: it breaks code analysis.
I think I will write a script for generating the pythonic module instead of doing the conversion at runtime. Not as elegant, but I want to keep code completion, etc. I will merge the feature branch into master when that's done.
Thank you for the suggestion and your help in porting the names!
This is my attempt at implementing #18.
I ran into a couple of problems in the process:
Using the snakecase generator in __init_\.py requires the imported modules in GLFW.py to start with an underscore (e.g.(nevermind. See https://github.com/FlorianRhiem/pyGLFW/pull/19/commits/b9032a7ee6275d1768c9ff4ab8b71b666cf74c44)_ctypes
) -- or it could justcontinue
if thename
is an imported module, but I didn't think of that.ERROR_REPORTING
is not accessible by GLFW.py, so I had to add a variable (_error_reporting_query_func
) holding a function getting said macro , which has to be set by __init__.py -- I'm sure there is a better way of doing this, but I couldn't think of any.EDIT I didn't mention this anywhere, but
_raise_glfw_errors_as_exceptions
checks ifglfw.ERROR_REPORTING
andglfw.GLFW.GLFW_ERROR_REPORTING
areTrue
, meaning it won't raise an exception if either of them are set toFalse
.Best regards, --Zuzu_Typ--