File tree 3 files changed +16
-5
lines changed
3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
appnope == 0.1.3
2
2
asttokens == 2.2.1
3
- asyncio == 3.4.3
4
3
attrs == 23.1.0
5
4
backcall == 0.2.0
6
5
black == 23.7.0
@@ -27,7 +26,6 @@ iniconfig==2.0.0
27
26
ipykernel == 6.24.0
28
27
ipython == 8.14.0
29
28
isort == 5.12.0
30
- janus == 1.0.0
31
29
jedi == 0.18.2
32
30
jsonschema == 4.18.4
33
31
jsonschema-specifications == 2023.7.1
@@ -54,7 +52,6 @@ pyasn1==0.5.0
54
52
pyasn1-modules == 0.3.0
55
53
Pygments == 2.15.1
56
54
pytest == 7.4.0
57
- pytest-asyncio == 0.21.1
58
55
pytest-dependency == 0.5.1
59
56
python-dateutil == 2.8.2
60
57
pyzmq == 25.1.0
Original file line number Diff line number Diff line change 4
4
"""
5
5
6
6
import logging
7
+ import time
7
8
from jupyter_client .blocking .client import BlockingKernelClient
8
9
from watchdog .observers import Observer
9
10
from watchdog .events import FileSystemEventHandler
@@ -113,7 +114,20 @@ def start_watches():
113
114
114
115
115
116
def main ():
116
- start_watches ()
117
+ logging .basicConfig (
118
+ level = logging .INFO , format = "%(levelname)s:%(name)s:%(message)s"
119
+ ) # Configure logging here
120
+ threads , stop_event = start_watches ()
121
+
122
+ try :
123
+ while True : # Keep the script running
124
+ time .sleep (1 )
125
+ except KeyboardInterrupt :
126
+ stop_event .set () # Signal the threads to stop
127
+ for thread in threads :
128
+ thread .join () # Wait for all threads to finish
129
+
130
+ print ("Exiting..." )
117
131
118
132
119
133
if __name__ == "__main__" :
Original file line number Diff line number Diff line change 10
10
import logging
11
11
from capture_output_stream import start_watches
12
12
13
- logging .basicConfig (level = logging .INFO , format = "%(levelname)s:%(name)s:%(message)s" )
13
+ logging .basicConfig (level = logging .INFO , format = "%(levelname)s:%(name)s: %(message)s" )
14
14
logger = logging .getLogger (__name__ )
15
15
16
16
You can’t perform that action at this time.
0 commit comments