Hi, I always forget to cast Paths to strings while using the Python API. For example
from pathlib import Path
import klayout.db as db
some_path = Path.cwd().parent
...
l2n = db.LayoutToNetlist(SOME_CELL.begin_shapes_rec(0))
l2n.extract_netlist()
l2n.netlist().write(some_path / "netlist.spice", ...)
will fail as some_path / "netlist.spice" is not actually supported and needs to be converted to a string . I was wondering would there be a simple way to do this conversion in the KLayout API side before the underlying C++ calls instead?
Hi, I always forget to cast Paths to strings while using the Python API. For example
will fail as
some_path / "netlist.spice"is not actually supported and needs to be converted to a string . I was wondering would there be a simple way to do this conversion in the KLayout API side before the underlying C++ calls instead?