Changeset 23:6189d0cecd2d
Legend:
- Unmodified
- Added
- Removed
-
main.py
r20 r23 ˆà 1 1 import Tkinter as tkˆà ˆà 2 import tkFileDialog as tkfdˆà 2 3 import engineˆà 3 4 ˆà òÀæ òÀæ ˆà 17 18 returnˆà 18 19 def buttons_pack(self, frame):ˆà 19 ˆà load_1 = tk.Button(frame, text="Load", command=self.load _1())ˆàˆà 20 load_1 = tk.Button(frame, text="Load", command=self.load(1))ˆà 20 21 load_1.pack(side="top", fill="both", expand = "yes")ˆà 21 ˆà load_2 = tk.Button(frame, text="Load", command=self.load _2())ˆàˆà 22 load_2 = tk.Button(frame, text="Load", command=self.load(2))ˆà 22 23 load_2.pack(side="top", fill="both", expand = "yes")ˆà 23 24 run_b = tk.Button(frame, text="Run", command=self.run())ˆà 24 25 run_b.pack(side="top", fill="both", expand = "yes")ˆà 25 ˆà load_3 = tk.Button(frame, text="Load", command=self.load _3())ˆàˆà 26 load_3 = tk.Button(frame, text="Load", command=self.load(3))ˆà 26 27 load_3.pack(side="bottom", fill="both", expand = "yes")ˆà 27 ˆà load_4 = tk.Button(frame, text="Load", command=self.load _4())ˆàˆà 28 load_4 = tk.Button(frame, text="Load", command=self.load(4))ˆà 28 29 load_4.pack(side="bottom", fill="both", expand = "yes")ˆà 29 30 step_b = tk.Button(frame, text="Step", command=self.step())ˆà 30 31 step_b.pack(side="bottom", fill="both", expand = "yes")ˆà 31 32 returnˆà 32 ˆà def load (self):ˆà ˆà 33 def load (self, snake_number):ˆà ˆà 34 file_name = tkfd.askopenfilename(title="Open file")ˆà ˆà 35 snake_file = open(file_name,'r')ˆà ˆà 36 ˆà 33 37 passˆà 34 ˆà def load_1 (self):ˆà 35 ˆà passˆà 36 ˆà def load_2 (self):ˆà 37 ˆà passˆà 38 ˆà def load_3 (self):ˆà 39 ˆà passˆà 40 ˆà def load_4 (self):ˆà 41 ˆà passˆà ˆà 38 ˆà 42 39 def run (self):ˆà ˆà 40 ˆà 43 41 passˆà 44 42 def step (self):ˆà ˆà 43 ˆà 45 44 passˆà 46 45 ˆà
Note: See TracChangeset
for help on using the changeset viewer.