First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I am trying to develop a script which would run from within PSSE (ie, launched as an automation script via Ctrl+Shift+A) which displays a GUI using tkinter. The UI in general displays, but I've noticed odd quirks like clicking on a menu item in PSSE usually takes two or three clicks (kind of like the program is being unresponsive). Also sometimes fields in PSSE will not populate while the script is running. For example (in PSSE v30):
It looks to me like tkinter is not giving full focus back to PSSE. Anyone know what to do to get this to work.
Sample Code:
# UI Example for psspy.org
from Tkinter import *
class appForm( Frame ):
def __init__( self, master=None ):
"""Create the GUI"""
Frame.__init__( self, master )
self.pack()
self.btnTest = Button(self, text="Button")
self.btnTest.pack()
if __name__ == "__main__":
# Set up TK
root = Tk()
# Run the program
app = appForm(master=root)
app.mainloop()
Thanks!