[Chimera-users]

Eric Pettersen pett at cgl.ucsf.edu
Tue Aug 9 13:45:32 PDT 2005


Hi Sabuj,
     It is the indentation.  In Python, indentation is meaningful and  
statements at the same "level" have to have the same indentation.   
I've appended the critical part below.  Note the the  
"self.rulerTexts..." and "x += ..." statements are indented one space  
further than the preceding if/else and "text = ..." statements.  To  
Python, the extra space starts a new indented block of statements,  
which is only legal after 'if' statements and so forth.  Take a space  
away from the front of the last two statements and I think things  
will work.

--Eric



                 for chunkStart in range(self.seqOffset, end, 10):
                        seq1index = self.seqs[0].gapped2ungapped  
(chunkStart)
                        if seq1index is None:
                                dispText = "?"
                        else:
                                dispText = str(seq1index+1)
                        text = self.mainCanvas.create_text(x, y,   
anchor='s',
                                font=self.font, text="%s" % (dispText))
                         self.rulerTexts.append(text)
                         x += self.chunkGap + 10 * (self.fontPixels[0]
                                                         +   
self.letterGaps[0])



More information about the Chimera-users mailing list