You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
513 B
23 lines
513 B
3 years ago
|
import os
|
||
|
import threading
|
||
|
import pdb
|
||
|
import time
|
||
|
|
||
|
"""Module wait file "init_debug" in working directory
|
||
|
"""
|
||
|
|
||
|
gKWARGS = None
|
||
|
|
||
|
def LiveDebugCheckLoop():
|
||
|
while True:
|
||
|
if os.path.exists("init_debug"):
|
||
|
pdb.set_trace()
|
||
|
time.sleep(30.0)
|
||
|
|
||
|
def LiveDebugCheckThread(**inKWARGS):
|
||
|
"""Create thread to wait file appear "init_debug" in the working directory.
|
||
|
"""
|
||
|
global gKWARGS
|
||
|
gKWARGS = inKWARGS
|
||
|
lThread = threading.Thread(target=LiveDebugCheckLoop)
|
||
|
lThread.start()
|