Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Possible to access Basic library from standalone python module?

I would like to access some of the functionality of the Basic library (specifically, the text generation) from within the standalone python module.
Inside the application the following code should work

import klayout.db as pya

lay = pya.Layout()
top = lay.create_cell("TOP")

para = {"text":  "Hello world", "mag": 1000, "layer": lay.layer(1, 0)}
pcell = lay.create_cell("TEXT", "Basic", para)
trans =, 0, False, 0, 0)
mycell = top.insert(, trans))

However, when used from the standalone module, it does not. The basic library does not seem to be exposed typically, (pya.Library.library_names() returns the empty list []), but I could also not find how I would load it.

Is there a way for me to load the Basic library from inside my standalone code?

Thanks a lot,



Sign In or Register to comment.