-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathScreen.py
More file actions
49 lines (32 loc) · 1.46 KB
/
Screen.py
File metadata and controls
49 lines (32 loc) · 1.46 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from tkinter import *
from tkinter.ttk import *
import uPyExplorer.Terminal
import uPyExplorer.MicroPyTree
import uPyExplorer.UnixPyTree
class Screen(Frame):
def __init__(self, master, replCon,option, kw=None):
super().__init__(master, kw=kw)
self.option=option
self.replCon=replCon
self.master=master
self.columnconfigure(0, weight=1)
self.columnconfigure(1, weight=1)
# self.rowconfigure(0, weight=1)
self.rowconfigure(1, weight=2)
self.rowconfigure(3, weight=2)
self.terminal = uPyExplorer.Terminal.Terminal(self, replCon)
self.terminal.grid(row=3, column=0, sticky="NSEW", columnspan=2, padx=5, pady=5)
self.unixTree = uPyExplorer.UnixPyTree.UnixPyTree(self,replCon,self.option,self.terminal)
self.unixTree.grid(row=1, column=0, columnspan=1,sticky="NSEW", padx=5)
self.tree = uPyExplorer.MicroPyTree.MicroPyTree(self, self.replCon)
self.tree.grid(row=1, column=1, sticky="NSEW",columnspan=1, padx=5)
self.tree.setOtherTree(self.unixTree)
self.unixTree.setOtherTree(self.tree)
self.unixTree.frame.grid(row=0, sticky="W",column=0, padx=5)
self.tree.frame.grid(row=0, sticky="W",column=1, padx=5)
def focusIn(self):
self.terminal.startSerialRead()
self.unixTree.getPlatform()
self.tree.getPlatform()
def focusOut(self):
self.terminal.stopSerialRead()