It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I'm new to python scripting in Klayout environment.
My macro (.lym) needs external files (powershell and dll). I want to store them next to the macro file.
Is there a way to access the path of the macro at runtime?
Comments
Yes, there is.
In Python this is
__file__
. In Ruby, it's__FILE__
.So in Ruby, to address a file called "additional.file" relative to the .lym file you can use:
I Python I'm using:
Matthias
Thanks ! It's exactly what I was looking for.