def showGrid(self): plotInfo = self.readData(self.cons.get()) self.paths = ast.literal_eval(plotInfo[4]) # if the user never asked to show the grid before or asks for a new grid if self.pathsSet == 0 or self.selectedNetlist != self.cons.get(): self.enableShowPaths() self.pathsSet = 1 # remember the selected netlist self.selectedNetlist = self.cons.get() # prepare for the grid visualization measures = self.getPrint() printObject = Print.Print() defToCall = "getPrint" + self.printvar.get() gates = getattr(printObject, defToCall)() self.v = [measures[0], measures[1], measures[2], self.paths, gates] # select only the paths with the selected lengths newPaths = [] for element in self.paths: if len(element[0]) >= self.showPathsFrom.get() and len( element[0]) <= self.showPathsTo.get(): newPaths.append(element) self.visualizeGrid(self.v[0], self.v[1], self.v[2], newPaths, self.v[4])
def __init__(self, args): printObject = Print.Print() defToCall = "getPrint" + args[1] self.p = getattr(printObject, defToCall)() self.pr = args[1] self.from_ = args[2] self.start()
def get_print(self): tok = self.lex.get_next_token() self.match(tok, TokenType.PRINT_KW_TOK) tok = self.lex.get_next_token() self.match(tok, TokenType.OPEN_PAREN_TOK) exp = self.get_expression() tok = self.lex.get_next_token() self.match(tok, TokenType.CLOSE_PAREN_TOK) return Print.Print(exp)
for l in prog.Code: print(l, prog.Code[l]) # Generate a text listing of it, and display it as we do so. listing = L.List(prog, True) # Renumber our program. Default is start 10, step 10. RN.Renumber(prog) # ... and list it again. L.List(prog, True) # Save it as a text file. STXT.Save(prog, OutDir + "/" + ProgName + ".txt") # Load it again from this text file... prog2 = STXT.Load(OutDir + "/" + ProgName + ".txt") # ... and list it again. L.List(prog2, True) # If you have not installed ReportLab and a CBM font, comment out the next line of code. P.Print(prog2, OutDir + "/" + ProgName + ".pdf")
# Add an image element to the dictionary im[shotscountdown] = PIL.Image.open(os.path.join( imagefolder, filename)).transpose(Image.FLIP_LEFT_RIGHT) # Set timepulse to 999 timepulse = 999 # Set message to empty Message = "" # Call image processing function and pass in dictionary containing all images ImageProcessing(im, background_template_location, imagefolder, imagecounter) # Call print function to print photos Print(TotalImageCount) # Clear message variable Message = "" # Update display update_display(TotalImageCount, Numeral, Message, PhotosPerCart, screen, background, pygame) # Set timepulse to 999 timepulse = 999 # Reset the shutter switch while input_value == False: input_value = gpio.input(22)
def p_INS_PRINT(self, t): 'PRINT : wprint parea EXP parec ptocoma' t[0] = Print(t[3], t.slice[1].lineno, self.find_column(self.input, t.slice[2])) GLO.gramatica[17] = GLO.gram[17]