klayout/macbuild/Resources/start-console.py

13 lines
469 B
Python

#!/Applications/klayout.app/Contents/MacOS/klayout -b -r
import readline
import code
import sys
variables = globals().copy()
variables.update(locals())
shell = code.InteractiveConsole(variables)
cprt = 'Type "help", "copyright", "credits" or "license" for more information.'
banner = "Python %s on %s\n%s\n(%s)" % (sys.version, sys.platform,
cprt, "KLayout Python Console")
exit_msg = 'now exiting %s...' % "KLayout Python Console"
shell.interact(banner, exit_msg)