Error with draw()

So far, when I run a script having the command draw() including two I copied from http://matplotlib.sourceforge.net/tutorial.html a fatal python error occurs when the script completes. I've tried different backends and numeric libraries with out success. Win XP. The scripts are run in a cmd box. Any ideas?
Thanks,
Gene

    from pylab import *
    import time

    # turn interactive mode on for dynamic updates. If you aren't in
    # interactive mode, you'll need to use a GUI event handler/timer.
    ion()

    tstart = time.time() # for profiling
    x = arange(0,2*pi,0.01) # x-array
    line, = plot(x,sin(x))
    for i in arange(1,50):
        line.set_ydata(sin(x+i/10.0)) # update the data
        draw() # redraw the canvas

    print 'FPS:' , 200/(time.time()-tstart)

e:\Data\NRAO\DG DTE>m1.py --verbose-helpful
matplotlib data path E:\Programs\Python24\share\matplotlib
$HOME=E:\Documents and Settings\Gene
CONFIGDIR=E:\Documents and Settings\Gene\.matplotlib
loaded rc file E:\Documents and Settings\Gene\.matplotlib\matplotlibrc
matplotlib version 0.84
verbose.level helpful
interactive is False
platform is win32
numerix numarray 1.4.1
font search path ['E:\\Programs\\Python24\\share\\matplotlib']
loaded ttfcache file E:\Documents and Settings\Gene\.matplotlib\ttffont.cache
backend TkAgg version 8.4
FPS: 34.4115620704
Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

e:\Data\NRAO\DG DTE>