tkwindow.py (pymol-v1.8.6.0.tar.bz2) | : | tkwindow.py (pymol-v2.1.0.tar.bz2) | ||
---|---|---|---|---|
# demonstration plugin which opens up a window on startup | # demonstration plugin which opens up a window on startup | |||
# | # | |||
# you must copy this file into modules/pmg_tk/startup/ | # you must copy this file into modules/pmg_tk/startup/ | |||
# | # | |||
# pymol will then run the script on startup | # pymol will then run the script on startup | |||
from Tkinter import * | try: | |||
from tkFileDialog import * | from Tkinter import * | |||
from tkFileDialog import * | ||||
except ImportError: | ||||
from tkinter import * | ||||
from tkinter.filedialog import * | ||||
from pymol import cmd | from pymol import cmd | |||
class myTkWindow: | class myTkWindow: | |||
def __init__(self,app): | def __init__(self,app): | |||
self.root = Tk() | self.root = Tk() | |||
self.app = app | self.app = app | |||
self.root.geometry(newGeometry="+900+50") | self.root.geometry(newGeometry="+900+50") | |||
Button(self.root, | Button(self.root, | |||
text="Open File", | text="Open File", | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 7 lines changed or added |