Commits

Hakan Ardo  committed a1b4b82

more general

  • Participants
  • Parent commits 1c0e3f5

Comments (0)

Files changed (2)

File talk/dls2012/demo/demo.py

     vim.send('>')
     vim.type('kowhile not labels.done:<CR>labels.done = True<ESC>')
     vim.type('28ggoself.done = False<ESC>')
-    vim.type('43gg39ggOif self.labels[x, y] != l:<CR>self.done = False<ESC>:w<CR>')
+    vim.type('43gg39ggI<CR><ESC>ka<BS><TAB>if self.labels[x, y] != l:<CR>self.done = False<ESC>:w<CR>')
 
     pause("As a final touch, lets renumber the labels be consecutative\n" + 
           "integers.")

File talk/dls2012/demo/detect.py

         for x, y in seg.indexes():
             if seg[x, y]:
                 ll = [labels[x, y], labels[x-1, y], labels[x-1, y-1],
-                        labels[x, y-1], labels[x+1, y-1]]
+                      labels[x, y-1], labels[x+1, y-1]]
                 labels.update(x, y, ll)
 
         for x, y in reversed(seg.indexes()):
             if seg[x, y]:
                 ll = [labels[x, y], labels[x+1, y], labels[x-1, y+1],
-                        labels[x, y+1], labels[x+1, y+1]]
+                      labels[x, y+1], labels[x+1, y+1]]
                 labels.update(x, y, ll)
 
     labels.renumber()