klayout/macbuild/Resources/start-console.py

17 lines
519 B
Python
Raw Normal View History

#!/Applications/klayout.app/Contents/MacOS/klayout -b -r
import readline
import code
import sys
2018-04-11 22:52:00 +02:00
import os
pwd = os.getcwd()
sys.path.append(pwd)
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)