klayout icon indicating copy to clipboard operation
klayout copied to clipboard

running ruby (drc) macro from standalone python module

Open tvt173 opened this issue 1 year ago • 2 comments

hi,

I was wondering if there was a way to make this work or if it is currently not possible:

    import klayout.lay as klay
    import klayout.tl as ktl

    macro_name = "my_rules.drc"
    macro = klay.Macro(macro_name)
    interpreter = ktl.Interpreter.ruby_interpreter()  # returns None
    macro.interpreter = interpreter  # throws RuntimeError
    macro.run()

I know that I can do this by running the macro via the klayout cli, in a python Subprocess. but I noticed that this (more convenient) method already seems to exist in the python API, though I couldn't get it to work. i'm suspecting that this functionality doesn't ship with the standalone python installation, but i thought i'd double check. thanks!

tvt173 avatar Jul 05 '24 02:07 tvt173