> > If I run that one time in maya,no problem. > If run it a seconde time,the system crashes.
do you mean a second time with the first window still open? i.e. with the first rigBuilderUI.mainloop still running? > > It looks like the problem is caused by the .mainloop() is it possible to spawn more than one window from a tk.Tk object? if this is anything like a QApplication, you can have only one, and this would make sense because the function to run it is called *main*loop(). > > Any suggestions? while PyQT is quite a bit more work to get up and running, it's worth it for the community support -- http://groups.google.com/group/python_inside_maya
