On Tue, Nov 25, 2008 at 11:27 AM, Stephen Kennedy <[EMAIL PROTECTED]> wrote: > Looks like a python2.4/2.5 parser difference. > > You can always assign to a temporary > idx = 1 if len(files) >= 2 else 0 > self.textview[idx].grab_focus()
maybe even better if it's the ternary operator that's the problem would be : if len(files) >= 2: idx = 1 else: idx = 0 self.textview[idx].grab_focus() or for the C-backgrounder: self.textview[int(len(files) >= 2)].grab_focus() Which assumes int(<Boolean>) will stay stable accross future revisions... this should work even with Python-1.5: $ /usr/bin/python1.5 Python 1.5.2 (#0, Sep 17 2002, 20:29:27) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> int(True) Traceback (innermost last): File "<stdin>", line 1, in ? NameError: True >>> int(1==0) 0 >>> int(1==1) 1 > I don't have a way to test with v2.4 unfortunately so there may be > more issues similar to this one That could (should ?) be fixed. The more people able to run meld, the better... -- Vincent Legoll _______________________________________________ meld-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/meld-list
