I think you mixed up "Expressions" with Ruby. "Expressions" are NOT Ruby. They are not scripts. Expressions are a low-level feature used inside KLayout for quick evaluation of numerical or conditional expressions. When you write scripts, you have to use Ruby features.
Comments
Hi Itamar,
I think what you are looking for is File.dirname:
I think you mixed up "Expressions" with Ruby. "Expressions" are NOT Ruby. They are not scripts. Expressions are a low-level feature used inside KLayout for quick evaluation of numerical or conditional expressions. When you write scripts, you have to use Ruby features.
Matthias