It looks like you're new here. If you want to get involved, click one of these buttons!
Does the above error mean that klayout was not compiled with Qt? I get it when doing:
import pya
from pya import Qt
which is used by some DRC/LVS scripts
I'm using klayout-0.29.10 installed with pip.
Comments
Hi!
I may be mistaken, but DRC/LVS scripts are written on Ruby.
pya
module is defined in KLayout 's built-in Python interpreter, so should be executed only there, not in standalone Python. See https://www.klayout.de/doc-qt5/code/index.html for list of things defined inpya
module.Hi,
As @EugeneZelenko explained above, the Qt framework (subset) is a part of the KLayout main GUI program.
If you want to use Qt with the KLayout standalone Python module, PyQt5 is a choice.
You can find a simple example in this post.
Hello,
I'm the one who wrote the pymacro for sky130 DRC/LVS that uses Qt.
To clear things up, this is not using KLayout's standalone Python module, but uses KLayout's built-in Python interpreter. The purpose of using Qt before running the DRC is to have some options that can be toggled.
Yes, DRC/LVS can only be executed from Ruby. Therefore, this Python script sets up a pya.Interpreter() to run DRC. This can be seen in this line: https://github.com/efabless/sky130_klayout_pdk/blob/9e3b9c05e1a09f1376eaa232a9db73dcb48d747b/tech/sky130/pymacros/run_drc_custom.lym#L122
This works without any problems on my platform (Debian trixie). When executing the pymacro, a small window opens in which you can select which parts of the DRC should be activated, then the DRC is executed on the current layout.
Of course, this won't work for the standalone Python module, as neither Qt nor Ruby scripts are supported.
@mrg do you get the same error when you run the pymacro from the "Efabless sky130" menu?
Thanks for this discussion
Point is, that DRC/LVS is pretty useless with the Python module alone as that not only misses Qt, but also does not feature Ruby, which is needed to execute DRC/LVS scripts. The typical runtime for that case is the KLayout binary in batch mode (
klayout -b -r ...
).I understand the popup is some UI integration thing, but the DRC/LVS can be run without UI in batch mode too. Right?
Matthias