How to avoid showing a lot of OpenGL/Nvidia-information when starting my script?

Forums: 

Hi,

I have a pythonOCC-file with something like the following:

from OCC.Display.SimpleGui import init_display
...
...
class myOCCclass:
    def __init__(self, args):
        ....
        self.display, self.start_display, self.add_menu, self.add_function_to_menu = init_display()

When I run it, I get something like:

qt-pyqt5 backend - Qt version 5.15.8
####### 3D rendering pipe initialisation #####
Display3d class initialization starting ...
Aspect_DisplayConnection created.
OpenGl_GraphicDriver created.
V3d_Viewer created.
AIS_InteractiveContext created.
V3d_View created
Xw_Window created.
TKOpenGl | Type: Other | ID: 0 | Severity: Medium | Message:
  OpenGl_Window::CreateWindow: window Visual is incomplete: no stencil buffer
Display3d class successfully initialized.
#########################################
OpenGl information:
  GLvendor: NVIDIA Corporation
  GLdevice: NVIDIA GeForce GTX 1070/PCIe/SSE2
  GLversion: 4.6.0 NVIDIA 525.89.02
  GLSLversion: 4.60 NVIDIA
  Max texture size: 32768
  Max FBO dump size: 32768x32768
  Max combined texture units: 192
  Max MSAA samples: 32
  Viewport: 1023x767
  ResolutionRatio: 1

Which is fine for investigating graphics driver issues etc... But not in general. It's a lot of useless lines I would prefer to not see... I tried to grep/look in /usr/lib/python3.10/site-packages/OCC for something useful... My question is:

How to disable this openGL output?

BRIAN TATTING's picture

I am also interested in suppressing this information. Any fix?