klayout icon indicating copy to clipboard operation
klayout copied to clipboard

Provide a way to suppress or redirect log output or disable warnings, specifically from file readers, in Python module

Open klayoutmatthias opened this issue 2 years ago • 1 comments

For background see here: https://www.klayout.de/forum/discussion/2127/how-to-suppress-warning-output#latest

klayoutmatthias avatar Aug 10 '22 21:08 klayoutmatthias

The solutions proposed with the listed PR is a new option for "LoadLayoutOptions", i.e.

options = pya.LoadLayoutOptions()
options.warn_level = 0
ly = pya.Layout()
# Enjoy reading without warnings
ly.read("my.dxf", options)
...

klayoutmatthias avatar Aug 13 '22 20:08 klayoutmatthias