예제 #1
0
파일: test.py 프로젝트: mldelibero/geda2
def copySch__test(schem,sub_sch,copies,projPath,tmpPath):
    copy_sch.copy_sch(schem,sub_sch,copies,projPath,tmpPath)
    sch_file = "%s%s" % (projPath,schem)
    openSch = """gschem %s""" % sch_file
    subprocess.call(['sh','-c',openSch])
    revertSch = """cp %s.bak %s""" % (sch_file,sch_file)
    subprocess.call(['sh','-c',revertSch])
예제 #2
0
파일: main.py 프로젝트: mldelibero/geda2
'''

from init import init
from renameRef import renameRef
from copy_sch import copy_sch
from copy_pcb import copy
from cleanup import cleanup
from init import tempdir as tmpDir

projectPath= "/Users/mldelibero/case/masters/hightemp/board/siggen/"
#projectPath= "/Users/mldelibero/case/masters/stressCap/buckDemo/board/"
#projectPath= "./ex1/"
schematic = "temp.sch"
layout = "temp.pcb"
sub_schematic = "siggen.sch"
sub_layout = "gen.pcb"

numCop = 4 # Total number of instances desired in the overall project

def getinfo():
    """Return the variables initialized above"""
    return tuple([projectPath,schematic,layout,sub_schematic,sub_layout,numCop])

if __name__ == "__main__":
    tempPath = init(schematic,layout,sub_schematic,sub_layout,numCop,projectPath)
    renameRef(sub_schematic,sub_layout,numCop,tmpDir)
    copy_sch(schematic,sub_schematic,numCop,projectPath,tmpDir)
    copy(layout,sub_layout,numCop,projectPath,tmpDir)
    cleanup(tempPath)