示例#1
0
def load(filename, mode=None):
    '''
        Modes are
        - 0 (default): replacing the current layout view
        - 1: making a new view
        - 2: adding the layout to the current view (mode 2)
    '''
    # if it's remote, we have to ship the file over first
    filename = fast_realpath(filename)
    if is_host_remote():
        filename = ship_file(filename)  # filename has changed to reflect what it is on the remote system
    tokens = ['load', filename]
    if mode is not None:
        tokens.append(str(mode))
    send(' '.join(tokens))
示例#2
0
def view(cellname):
    send('cellview ' + str(cellname))
示例#3
0
def kill():
    send('kill')
示例#4
0
def reload():
    send('reload view')
示例#5
0
''' Test script with no dependencies on layout packages

    This should have the same behavior whether interpreted by klayout or python
'''

from os.path import join, dirname
import sys
sys.path.append(join(dirname(__file__), '..', 'python'))

import lyipc.client as ipc
import time, os

print('Sending ping')
ipc.send('ping')

print('Going to load gds now')
gdsname = os.path.realpath('box.gds')
ipc.load(gdsname)

print('Done')