I've seen similar when I bought a 1070 where everything flickers between new and old frames. It's nothing to do with Python, and it's certainly not DirectX, C++ or NET as Blender uses none of those libraries; it's likely a discrepancy between how newer NVIDIA cards handle OpenGL and how Blender 2.49 handles OpenGL, particularly the framebuffer. There's options in the NVIDIA Control Panel for specific programs, you may need to add Blender to that list, and from there set its specific settings to use one of the alternate frame renders.