Best Python code snippet using ATX
tkgui.py
Source:tkgui.py
...91 self._bounds = (self._lastx, self._lasty, x, y)92 self._draw_bounds(self._bounds)93 x, y = (self._lastx+x)/2, (self._lasty+y)/294 self.tag_point(x, y)95 def _stroke_done(self, event):96 c = self.canvas97 x, y = c.canvasx(event.x), c.canvasy(event.y)98 if self._moved:99 x, y = (self._lastx+x)/2, (self._lasty+y)/2100 self._center = (x, y) # rember position101 self.tag_point(x, y)102 self.canvas.itemconfigure('boundsLine', width=2)103 def _draw_bounds(self, bounds):104 c = self.canvas105 (x0, y0, x1, y1) = self._bounds106 c.create_rectangle(x0, y0, x1, y1, outline=self._color, tags='boundsLine', width=5)#, fill="blue")107 # c.create_line((x0, y0, x1, y1), fill=self._color, width=2, tags='boundsLine', dash=(4, 4))108 # c.create_line((x0, y1, x1, y0), fill=self._color, width=2, tags='boundsLine', dash=(4, 4))109 def tag_point(self, x, y):...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!