Closed keksnicoh closed 8 years ago
Unfortunately, I don't use python 3. I'm also very busy at the moment.
Could you build the library and paste any errors you receive? If not, it will have to wait until I get some free time.
Heyho, after my exams I will try and give you Feedback ;) Greetz
Am 23.06.2015 um 02:30 schrieb Adam Griffiths notifications@github.com:
Unfortunately, I don't use python 3. I'm also very busy at the moment.
Could you build the library and paste any errors you receive? If not, it will have to wait until I get some free time.
— Reply to this email directly or view it on GitHub https://github.com/adamlwgriffiths/cyglfw3/issues/14#issuecomment-114312039.
When passing str objects as title of a window generates a TypeError. It is expecting a byte object in 3.x. Easily fixed by ommiting the char* tag in the CreateWindow function (and wherever this is needed) and adding a function that always returns bytes.
"and adding a function that always returns bytes." Not sure what you mean by this.
Can you do a pull request? I can then check it with python 2.7.
Need to try and setup TravisCI which would make this a lot easier.
Basically whenever you pass a basic str object defined like title = "foo"
, passing title
to the title arg in cyglfw3.CreateWindow
will raise a TypeError: expected bytes, str found
. Simply adding changing the string to a bytes object fixes this.
For example: Line 15 in examples/gl4_1.py needs to be changed to window = glfw.CreateWindow(640, 480, b"Hello World")
in order to work.I believe defining something as simple as a function that take in either a str or a bytes object and always return a str object would fix this. I'm not familiar with cython but I'll try to implement it and pull request.
Merged and tested on 2.7 and 3.4
Tagged in git and released as 3.1.0.2 on PyPi
there is only python 2.7 support, would be very nice when this library could run in python3.*