I have a simple window to open a file that the data is then used to make a graph: The code for that part is: =====code======== window = Tkinter.Tk() #window.withdraw() <-- not sure what this does window.title('hello world') w = Tkinter.Label(window,text="hello, again") w.pack menubar = Tkinter.Menu(window) mfile = Tkinter.Menu(menubar, tearoff = 0) mfile.add_command(label="Open", command=callback) mfile.add_command(label="Save", command=callback) menubar.add_cascade(label="File", menu=mfile) window.config(menu=menubar) errmsg = 'Error!'
of_But = Tkinter.Button(window, text= "Open File", command=callback) of_But.pack() #Button(text='Quit', command=(lambda: showerror('Sure you want to quit?', errmsg))).pack(fill=X) q = Tkinter.Button(window, text="Quit", fg="red", command=window.quit) q.pack() window.mainloop() ================ I then create a map : =====code===== m1 = Basemap(llcrnrlon=-119,llcrnrlat=22,urcrnrlon=-64,urcrnrlat=49,\ projection='lcc',lat_1=33,lat_2=45,lon_0=-95,resolution='l') shp_info = m1.readshapefile(r'C:\Python25\Lib\basemap-0.9.9.1\examples\citiesx020','states',drawbounds=True) ax=p.gca() seqnum={} criteriatodisplay=[] names={} for seq, shapedict in enumerate(m1.states_info): if int(shapedict['POP_2000'])>150000: seqnum[seq]=shapedict['NAME'] criteriatodisplay.append(seq) m1.drawcoastlines() m1.fillcontinents() m1.drawcountries() m1.drawstates() m1.drawparallels(p.arange(25,65,4),labels=[1,0,0,0]) m1.drawmeridians(p.arange(-120,-40,4),labels=[0,0,0,1]) p.show() ====== But when I click on quit, I get this error: 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. It's not that big of a deal since I'm quitting anyways, but does anyone know how to fix this? Kurt ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users