PyMOL’s mainloop runs in a separate
thread from Tkinter, so you can’t call it directly from PyMOL scripts.
See modules/pmg_tk/startup/__init__.py inside
the PyMOL installation for an example code snippet for writing your own Tkinter
plugin for PyMOL (which install or run upon startup).
From: Bradley Hintze
Sent: Monday, March 09, 2009 11:15
Subject: [PyMOL] Tk and scripting
I am writing a script for PyMol and noticed you that PyMol freezes when
you try to bring up your own Tkinter windows. Is there a way to get around this
so I can get my Tk window up?
Bradley J. Hintze
Utah State University