new klayout_console script

This commit is contained in:
Thomas Ferreira de Lima 2018-04-11 16:52:00 -04:00
parent 87212fdd03
commit a9419b62f4
2 changed files with 9 additions and 1 deletions

View File

@ -1,2 +1,6 @@
#!/usr/bin/env bash
/Applications/klayout.app/Contents/MacOS/klayout -b -r /Applications/klayout.app/Contents/MacOS/start-console.py
if [ "$1" != "" ]; then
/Applications/klayout.app/Contents/MacOS/klayout $1 -r /Applications/klayout.app/Contents/MacOS/start-console.py
else
/Applications/klayout.app/Contents/MacOS/klayout -z -r /Applications/klayout.app/Contents/MacOS/start-console.py
fi

View File

@ -2,6 +2,10 @@
import readline
import code
import sys
import os
pwd = os.getcwd()
sys.path.append(pwd)
variables = globals().copy()
variables.update(locals())
shell = code.InteractiveConsole(variables)