예제 #1
0
 def __init__(self):
     if os.environ.has_key('JOB'):
         self.job = genClasses.Job(os.environ['JOB'])
     else:
         g.PAUSE('You need to open a job first')
         print g.STATUS
         exit(0)
예제 #2
0
    def getInfo(self):

        #Other parameters setup
        self.workLayer = ''
        self.pwrLayers = []
        self.runList = []  # Layers that conversion will be run on
        self.failedDict = {}  # Holds failed layers
        self.remNFP = 0  # Remove nonfunctional pads (default not to)
        self.drillLayer = 0  # Change to one if there is a drill layer 'ld'

        self.wasInJob = 0
        self.wasInStep = 0
        Label(
            self,
            font=largerFont,
            text='Running Positive Plane Conversion Step',
            fg='yellow',
            bg='darkgreen',
        ).pack(side=TOP)
        self.jobLabel = Label(self,
                              text='Please Select a Job',
                              fg='gray80',
                              bg='darkgreen')

        # This is a scrollbar object for the job selection list
        self.scrollList = Scrollbar(self, orient=VERTICAL, bg='blue')

        # This is the list box that will hold jobs/steps to select.
        self.ourListBox = Listbox(self,
                                  yscrollcommand=self.scrollList.set,
                                  bg='black',
                                  fg='gray80')
        self.scrollList.config(command=self.ourListBox.yview)
        self.but1 = Button(self,
                           text='Select Job',
                           command=self.getJob,
                           bg='blue',
                           fg='white')

        # This statement jumps to the correct procedure based on whether in Job/step or not
        if (self.status.currentJob()):  # if in a job...
            self.jobName = self.status.currentJob()
            self.wasInJob = 1
            if (self.status.currentStep()):  # if in a step...
                self.stepName = self.status.currentStep()
                self.job = genClasses.Job(self.jobName)
                self.verifyProfileExists()
                self.wasInStep = 1
            else:
                self.makeStepChoice()
        else:
            self.makeJobChoice()
예제 #3
0
    def makeStepChoice(self):
        self.jobLabel.config(text='Running on job: ' + self.jobName)
        self.jobLabel.pack(side=TOP, pady=5)
        self.job = genClasses.Job(self.jobName)
        self.job.open(1)
        self.allSteps = self.job.steps.keys()

        # Checks to see if there are any steps.  Errors if no steps to run on
        if len(self.allSteps) < 1:
            self.errorEvent()

        # Gets step names for list box
        for stepName in self.allSteps:
            self.ourListBox.insert(END, stepName)
        self.ourListBox.pack(side=LEFT, fill=BOTH, expand=1)
        self.scrollList.pack(side=LEFT, fill=Y)
        self.but1.config(text='Select Step', command=self.getStep)
        self.but1.pack(side=RIGHT, padx=10, pady=5)
예제 #4
0
        def makeStepChoice(self):
                self.jobLabel.config(font=largerFont,text='Running on job: ' + self.jobName)
                self.jobLabel.pack(side=TOP,pady=5)
		self.job = genClasses.Job(self.jobName)		# create the python-genesis job class instance
                self.job.open(1)				# Open the job - 1 means check out
                self.allSteps=self.job.steps.keys()		# save a list of the steps
                
                # Checks to see if there are any steps.  Errors if no steps on which to run
                if len(self.allSteps) < 1:
                        self.errorEvent()
                
                # Gets step names for list box
                for stepName in self.allSteps:
                        self.ourListBox.insert(END, stepName)
                # pack in those GUI components!
                self.ourListBox.pack(side=LEFT, fill=BOTH, expand=1)
		self.scrollList.pack(side=LEFT, fill=Y)
                self.but1.config(text='Select Step',command=self.getStep)
                self.but1.pack(side=RIGHT, padx=10, pady=5)
예제 #5
0
    def getInfo(self):
        self.wasInJob = 0
        self.wasInStep = 0
        Label(
            self,
            text='Running Initial DRC checklist',
            fg='gray80',
            bg='darkgreen',
        ).pack(side=TOP)
        self.jobLabel = Label(self,
                              text='Please Select a Job',
                              fg='gray80',
                              bg='darkgreen')

        # This is a scrollbar object for the job selection list
        self.scrollList = Scrollbar(self, orient=VERTICAL, bg='blue')
        # This is the list box that will hold jobs/steps to select.
        self.ourListBox = Listbox(self,
                                  yscrollcommand=self.scrollList.set,
                                  bg='black',
                                  fg='gray80')
        self.scrollList.config(command=self.ourListBox.yview)
        self.but1 = Button(self,
                           text='Select Job',
                           command=self.getJob,
                           bg='blue',
                           fg='yellow')

        # This statement jumps to the correct procedure based on whether in Job/step or not
        if (self.status.currentJob()):  # if in a job...
            self.jobName = self.status.currentJob()
            self.wasInJob = 1
            if (self.status.currentStep()):  # if in a step...
                self.stepName = self.status.currentStep()
                self.job = genClasses.Job(self.jobName)
                self.beforeAnalysis()
                self.wasInStep = 1
            else:
                self.makeStepChoice()
        else:
            self.makeJobChoice()
예제 #6
0
        def getInfo(self):
                
                self.wasInJob = 0		# Tells if script was started from within a job
                self.wasInStep = 0		# Tells if script was started from withing a step
                
                self.CustOutlineLayer = 'fabulous'  	# fab,dr  The layer with the fab drawing of the board profile - set to something we'd never have, so it would always prompt
                self.outlineLayer = 'outline'   # name of layer showing board edge/outline
                
                self.workLayer = 't_work'       # name of working layer for thieving stuff
                
                # Add two labels to GUI
                Label(self, font=boldFont,text='Running Outline Creation Operation',fg='yellow',bg='darkgreen',).pack(side=TOP)
                self.jobLabel = Label(self,text='Please Select a Job',fg='gray80',bg='darkgreen')
                
                # This is a scrollbar object for the job selection list
                self.scrollList = Scrollbar(self,orient=VERTICAL,bg='blue')
                # This is the list box that will hold jobs/steps to select.
		self.ourListBox = Listbox(self, yscrollcommand=self.scrollList.set, bg='black',fg='gray80')
                #attach scroll bar to list box
		self.scrollList.config(command=self.ourListBox.yview)
                #add button to use for job selection
                self.but1 = Button(self, font=buttonFont, text='Select Job', command=self.getJob, bg='blue', fg='yellow')
                
                # This statement jumps to the correct procedure based on whether in Job/step or not
                if (self.status.currentJob()):  # if in a job...
                        self.jobName = self.status.currentJob()		# This is like $JOB var is csh
                        self.wasInJob = 1				# This variable tells us if we were in a job when started
                        if (self.status.currentStep()):  # if in a step...
                                self.stepName = self.status.currentStep()	# This is like $STEP in csh
                                self.job = genClasses.Job(self.jobName)		# create Genesis-python job class
                                self.beforeAction()				# run beforeAction method - skip job and step selection
                                self.wasInStep = 1
                        else:
                                self.makeStepChoice()  				# if in a job, just choose step
                else:
                        self.makeJobChoice()					# if not in job or step, go to choose job
예제 #7
0
# Main routine...
if __name__ == '__main__':
	
	# Check to see which interface is available
	if myInter == 'Tk':
		myInter = tkInterface
	else:
		myInter = guiInterface

	# Run the interface, get the job name
	jobName = myInter('Enter Job Name')
	print 'My Job Name is::'+jobName
	
	# Instantiate the job object, open it without checkout
	job = genClasses.Job(jobName)
	
	job.open(1)
	
	# Run the interface to get a step name, Create a new step
	newStep = myInter('New step name to create')
	if newStep in job.steps.keys():
		job.PAUSE('Step '+newStep+' exists...create '+newStep+'-mjh ?')
		newStep = newStep+'-mjh'
	job.addStep(newStep)
	
	# open the new step
	job.steps[newStep].open()
	
	# Create a profile, zoom home, display the first layer
	newLayer = myInter('New layer name to create')