Best Python code snippet using ATX
tkgui.py
Source:tkgui.py
...82 self._moved = False83 c = self.canvas84 self._lastx, self._lasty = c.canvasx(event.x), c.canvasy(event.y)85 print 'click:', self._lastx, self._lasty86 def _stroke_move(self, event):87 self._moved = True88 self._reset()89 c = self.canvas90 x, y = c.canvasx(event.x), c.canvasy(event.y)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 position...
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!!