Changeset 160
- Timestamp:
- 08/17/04 16:50:16 (4 years ago)
- Files:
-
- 06/devel/aglPY.py (modified) (1 diff)
- 06/devel/algosPY.py (modified) (6 diffs)
- 06/devel/kombilo.py (modified) (4 diffs)
- 06/devel/searchPY.py (modified) (2 diffs)
- 06/devel/v.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
06/devel/aglPY.py
r153 r160 200 200 if self.showDate: sl.append(l[5]+', ') 201 201 try: 202 sl.append( join(self.DBlist[`self.boardsize`][DBindex].results[indexWithinCurrent], ''))203 except : pass202 sl.append(', '.join([x.output() for x in self.DBlist[`self.boardsize`][DBindex].results[indexWithinCurrent]])) 203 except IndexError: pass 204 204 return join(sl, '') 205 205 06/devel/algosPY.py
r150 r160 42 42 def moveno(self): 43 43 if self.where: 44 print self.where44 # print self.where 45 45 return self.where 46 46 else: … … 51 51 return [int(labelStr)] 52 52 53 def output(self): 54 if not self.where: return '/' + self.labelStr 55 if len(self.where) == 1: return str(self.where[0]) + self.labelStr 56 m = 0 57 i = 0 58 while i < len(self.where): 59 if i%2: m += 1 60 else: m += self.where[i] 61 i += 1 62 return 'V' + str(m) + self.labelStr 53 63 54 64 … … 326 336 of black/white moves and captures, respectively. The coordinates of the move/capture are 327 337 appended (as two bytes) to the movelist, and the second coordinate gets a flag indicating 328 what happen d at this positon (BLACK/WHITE/REMOVE).338 what happened at this positon (BLACK/WHITE/REMOVE). 329 339 330 340 In addition, if in the first byte the ENDOFNODE flag is set, this event is the last event … … 518 528 of a variation, we reset the dictionaries etc. to the values stored in the topmost entry of the 519 529 stack. 520 521 530 """ 522 531 … … 688 697 dicts[m]['found'] = counter 689 698 dicts[m]['whereAreWe'] = copy(whereAreWe) 690 print 'found', counter, whereAreWe699 # print 'found', counter, whereAreWe 691 700 del dicts[m]['foundInitial'] 692 701 else: … … 779 788 dicts[m]['found'] = counter 780 789 dicts[m]['whereAreWe'] = copy(whereAreWe) 781 print 'found1', counter, whereAreWe790 # print 'found1', counter, whereAreWe 782 791 else: dicts[m]['foundInitial'] = counter 783 792 06/devel/kombilo.py
r152 r160 327 327 328 328 329 def askdirectory(**options): return apply(chooseDirectory, (), options).show() 329 def askdirectory(**options): 330 return apply(chooseDirectory, (), options).show() 330 331 331 332 # --------------------------------------------------------------------------------------- … … 1943 1944 # results = [join(l.results, '|%') for l in self.gamelist.DBlist[`self.boardsize`]] 1944 1945 # FIXME results (is now list of Hit's) 1945 cursorSn = [self.cursor, self.cursor.currentGame, self.cursor.currentN.pathToNode()] 1946 1947 1946 # cursorSn = [self.cursor, self.cursor.currentGame, self.cursor.currentN.pathToNode()] 1948 1947 # see FIXME above (boardData = ...) 1949 # self.prevSearches.append([boardData, games, results, copy(self.continuations),1948 # self.prevSearches.append([boardData, games, results, copy(self.continuations), 1950 1949 # self.noMatches, self.noSwitched, self.Bwins, self.Wwins, 1951 1950 # self.modeVar.get(), self.fixedColorVar.get(), self.fixedAnchorVar.get(), … … 2496 2495 2497 2496 def getAnchors(self): 2498 print 'ANCHORS'2499 print self.sel2497 # print 'ANCHORS' 2498 # print self.sel 2500 2499 if self.sel[0] == (0,0) or \ 2501 2500 (self.sel[0][0], self.sel[1][1]) == (0,self.boardsize-1) or \ … … 2522 2521 self.boardsize-2 -self.sel[1][1]+self.sel[0][1])] 2523 2522 anchors.sort() # FIXME: is this necessary? 2524 print anchors2523 # print anchors 2525 2524 return anchors 2526 2525 06/devel/searchPY.py
r153 r160 572 572 win = self.getCurrentWinner() 573 573 self.newCurrent.append(self.current[self.currentIndexWithinCurrent]) 574 if not results is None and not type(results) == type([]): print 'Error' # FIXME 574 575 self.results.append(results) 575 576 … … 587 588 currentWithinDB = self.current[self.currentIndexWithinCurrent] 588 589 return self.namelist[currentWithinDB][3] 589 590 590 591 591 # --------------------------------------------------------------------------------------- 06/devel/v.py
r152 r160 2205 2205 2206 2206 if not filename: 2207 path, filename = os.path.split(tkFileDialog.askopenfilename(filetypes=[('SGF files', '*.sgf'), 2208 ('All files', '*')], 2209 initialdir=self.sgfpath)) 2207 aof = tkFileDialog.askopenfilename(filetypes=[('SGF files', '*.sgf'), ('All files', '*')], initialdir=self.sgfpath) 2208 if aof: path, filename = os.path.split(aof) 2210 2209 if filename: 2211 2210 try:
