SuSE 9.2 Problems

9.2 - Python 2.3:

SuSE Linux 9.0, 9.1 and 9.2 use Python 2.3.0, 2.3.3 and 2.3.4 respectively. There are bugs with Tkinter in these version of Python which effect skLaTeX (and other Skencil plugins) that SuSE has not yet fixed. There are work-arounds to these bugs for those SuSE users who do not have a compiler to install the latest Python 2.3.

Bug 843999 tkFileDialog Open is broken. When trying to open a file with the method askopenfilename(s) the following error is thrown: "TypeError: wantobjects() takes exactly 1 argument (0 given)". This bug effects skLaTeX's open file method and the multiline text load method (both use askopenfilename). The offending code is line 89 of the file /usr/lib/python/lib-tk/tkFileDialog.py. The line 89 is shown below:

    if not widget.tk.wantobjects() and "multiple" in self.options:

To my understanding it is technically the code in _Tkinter.c that is the problem and not line 89 of tkFileDialog.py. Never-the-less, the method wantobjects expects an integer for its argument. The valid integers I am aware of are 1 and -1. One simple work-around is to supply an argument to the method. The below is a work-around (using 1 as the argument):

    if not widget.tk.wantobjects(1) and "multiple" in self.options:

For me, this seems to "solve" the problem and does not seem to cause ill-effects with Python (yet...). It is important to note that this work-around is not a solution to this bug or even the best work-around. If making this change causes any problems with Python on your system, simply change the line back to it's original state and avoid using the skLaTeX open option and the multiline text load option.

Is it a good idea to modify Python distribution files? No! But I know just enough Python to be dangerous ;-).