KLAYOUT_PATH

edited December 2015 in Ruby Scripting
When I'm trying to invoke the read(some_file) on an RBA::Layout, does klayout also check the paths in KLAYOUT_PATH?

I am trying to write a generic script where I can give it just the base filename, and then have klayout check a list of paths until it finds the file.

I have tried adding the list of paths to KLAYOUT_PATH, but klayout does not seem able to find my file...

Comments

  • edited December 2015

    Hi,

    KLAYOUT_PATH is just used to identify libraries, load scripts and locate Ruby/Python modules. It does not change the behaviour of RBA::Layout#read.

    Like with every well-mannered method there is no hidden functionality within RBA::Layout#read. This method just takes the path as it is.

    But you can easily code the desired behaviour by running a loop over all the places you look for and employ one of Ruby's nice File module methods to check whether the file is there or not.

    Matthias

Sign In or Register to comment.