I thought I’d share an example of using Dear ImGui, a popular C++ graphical user interface (GUI) library, in conjunction with PsychoPy. This could be used for simple, in-experiment GUIs/text entry/debugging utilities/etc.
I’ve had luck with this binding: GitHub - swistakm/pyimgui: Cython-based Python bindings for dear imgui (not totally stable, but probably fine for a one-off), and took a stab at the machinery to have it play well with pyglet windows (derived from the existing cocos2d/glfw examples). That machinery and an example can be found at GitHub - aforren1/pyimgui-demo.
One thing I ran into while playing around with this was that it didn’t always play well with visuals from psychopy (e.g. ShapeStim, RadialStim below).
I made a fork with minor changes to ShapeStim (BF: OpenGL tweaks to avoid interference between ShapeStim and pyimgui · aforren1/psychopy@1256131 · GitHub) that makes it look more reasonable,
but didn’t know whether I was mucking up the OpenGL state elsewhere. Any more OpenGL-savvy folks have an idea why they might not cooperate (some residual texture setting)?