-
Notifications
You must be signed in to change notification settings - Fork 0
/
testappclass.py
32 lines (27 loc) · 1.05 KB
/
testappclass.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
import sys
import numpy as np
from functools import partial
import tkyamlgui as tkyg
if sys.version_info[0] < 3:
import Tkinter as Tk
else:
import tkinter as Tk
class MyApp(tkyg.App, object):
def __init__(self, *args, **kwargs):
super(MyApp, self).__init__(*args, **kwargs)
t = np.arange(0, 3, .01)
self.fig.clf()
self.fig.add_subplot(111).plot(t, t**2)
# # -- Button demonstrating pullvals --
# button = Tk.Button(master=self.notebook.tab('Tab 1'),text="Pullvals",
# command=partial(tkyg.pullvals, self.inputvars,
# statuslabel=self.statusbar))
# button.grid(column=1, padx=5, sticky='w')
# # Add an exit button
# exitbutton = Tk.Button(master=self.notebook.tab('Tab 1'),
# text="Quit", command=self.quit)
# exitbutton.grid(row=10, column=0, padx=5, sticky='w')
self.formatgridrows()
if __name__ == "__main__":
MyApp().mainloop()