質問編集履歴
3
余分なところけずる
test
CHANGED
File without changes
|
test
CHANGED
@@ -142,16 +142,6 @@
|
|
142
142
|
|
143
143
|
# 終了
|
144
144
|
|
145
|
-
self.lb1.setImage("images\taiko.gif")
|
146
|
-
|
147
|
-
self.action.set(1)
|
148
|
-
|
149
|
-
self.menu_file.entryconfig("Run(R)", state="normal")
|
150
|
-
|
151
|
-
self.menu_file.entryconfig("Cancel(C)", state="disable")
|
152
|
-
|
153
|
-
|
154
|
-
|
155
145
|
reschedule = True
|
156
146
|
|
157
147
|
break
|
2
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -115,3 +115,65 @@
|
|
115
115
|
self.thread = None
|
116
116
|
|
117
117
|
```
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
### **20200623 10:11追記**
|
122
|
+
|
123
|
+
breakいれたあとのtime_count関数「リスケ後定刻処理が2重になってしまう」
|
124
|
+
|
125
|
+
```Python
|
126
|
+
|
127
|
+
def time_count(self):
|
128
|
+
|
129
|
+
while not self.stop_flag:
|
130
|
+
|
131
|
+
schedule.run_pending()
|
132
|
+
|
133
|
+
time.sleep(1)
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
reschedule = False
|
138
|
+
|
139
|
+
dt_now = datetime.datetime.now()
|
140
|
+
|
141
|
+
if dt_now.strftime("%X") == "09:57:00":
|
142
|
+
|
143
|
+
# 終了
|
144
|
+
|
145
|
+
self.lb1.setImage("images\taiko.gif")
|
146
|
+
|
147
|
+
self.action.set(1)
|
148
|
+
|
149
|
+
self.menu_file.entryconfig("Run(R)", state="normal")
|
150
|
+
|
151
|
+
self.menu_file.entryconfig("Cancel(C)", state="disable")
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
reschedule = True
|
156
|
+
|
157
|
+
break
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
else:
|
162
|
+
|
163
|
+
print(dt_now.strftime("%X"))
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
#リスケ
|
168
|
+
|
169
|
+
if reschedule:
|
170
|
+
|
171
|
+
rechedule = False
|
172
|
+
|
173
|
+
time.sleep(5)
|
174
|
+
|
175
|
+
self.thread = None
|
176
|
+
|
177
|
+
self.on()
|
178
|
+
|
179
|
+
```
|
1
誤り
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
self.stop_flag = True
|
64
64
|
|
65
|
-
self.thread.join()
|
65
|
+
self.thread.join() #★☆★cannot join current thread が現れる、除去すると定刻処理がWる
|
66
66
|
|
67
67
|
self.thread = None
|
68
68
|
|