I am writing some bindings for a c library using ctypes:
from ctypes.util import find_library
from ctypes import *
lib = find_library("lvm2app")
if not lib:
raise Exception("LVM library not found.")
lvmlib = CDLL(lib)
It is all good, except the library prints to stdout every now and then and it is a bit annoying. Is there a way I can suppress these prints? Thanks.