It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Matthias,
Do you know if there is an order to how files are loaded at KLayout start-up, specifically all the Python .lym files in different Technologies, Packages, etc. We've encountered challenges where the load order is different on Windows than Mac OSX, for example.
If I have three files:
pymacros/A.lym
pymacros/subfolder/B.lym
pymacros/subfoder/C.lym
do we know whether A would be always loaded before B and C?
thank you
Comments
Hi Lukas,
the macros should be run in literal (case-sensitive, UTF-8 encoding) order, subfolders before local macros. So in your case, the order should be:
Me recommendation however is to use Python modules if you need to load dependencies. You'll just need to adjust sys.path if you like to lookup the modules relative to the main file.
This is what I did: I replaced B.lym and C.lym by plain Python files (B.py, C.py) and inside A.lym I used:
This is make sure that B.py and C.py is read before A and you do not need to rely on a certain load order.
Best regards,
Matthias