Problems w/ Python 2.0b Win98/IDLE 0.6

Fredrik Lundh effbot at telia.com
Fri Sep 22 07:26:48 CEST 2000


Kirby Urner wrote:
> I'm getting somewhat erratic performance trying to graph to a 
> Tk canvas from Python 2.0b IDLE 0.6
> 
> My code will work at times, will actually draw graphs.  But 
> then it will start bombing out, even though I've made no 
> changes to the source code.

It's a bug in the garbage collector, which has been fixed
in the current code base.  It only affects code that uses
an internal "tuple resizing" function.

Some workarounds:

    Do "import gc; gc.disable()" before you start using the
    canvas might help.

or:

    Comment out the _flatten accelerator code in Tkinter.py
    (around line 70):

        # try: _flatten = _tkinter._flatten
        # except AttributeError: pass

or:

    Wait for 2.0b2, which will be out after the weekend.

</F>



More information about the Python-list mailing list