jonwright / pyopengltk

OpenGL frame for Python/Tkinter via ctypes and pyopengl
MIT License
54 stars 13 forks source link

add __init__ to linux.py and win32.py #33

Closed MarioGavran closed 8 months ago

MarioGavran commented 8 months ago

I just wanted to create init in linux.py and win32.py, so that I don't get warnings like "Instance attribute xx defined outside init ", when I create a new class from your 'OpenGLFrame' class.

like this example:

class TkinterOpenGL(OpenGLFrame):
    def __init__(self, master, /, *args, width, height):
        super().__init__(master=master, width=width, height=height)

        self.paths = args
        self.oglobj = None

I hope there is nothing wrong with this.. I think it is completely compatible.

I plan to use this in my project so It would be nice to not have to modify your code if there are going to be updates

jonwright commented 8 months ago

Looks good to me. I will merge it - just let me know if you need a new release on pypi

Thanks!

MarioGavran commented 8 months ago

Okay, great. No, I don't need pypi release