Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -293,11 +293,11 @@ async def read_process_output(process, websocket):
|
|
293 |
if char == b'\n':
|
294 |
if word:
|
295 |
print(word.decode('utf-8'),1)
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
word = b''
|
302 |
print("line is completed")
|
303 |
event = {
|
@@ -337,11 +337,11 @@ async def read_process_output(process, websocket):
|
|
337 |
if char == b'\n':
|
338 |
if word:
|
339 |
print(word.decode('utf-8'))
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
word = b''
|
346 |
print("line is completed")
|
347 |
event = {
|
|
|
293 |
if char == b'\n':
|
294 |
if word:
|
295 |
print(word.decode('utf-8'),1)
|
296 |
+
event = {
|
297 |
+
"type": "terminal-data",
|
298 |
+
"data": word.decode('utf-8'),
|
299 |
+
}
|
300 |
+
await websocket.send(json.dumps(event))
|
301 |
word = b''
|
302 |
print("line is completed")
|
303 |
event = {
|
|
|
337 |
if char == b'\n':
|
338 |
if word:
|
339 |
print(word.decode('utf-8'))
|
340 |
+
event = {
|
341 |
+
"type": "terminal-data",
|
342 |
+
"data": word.decode('utf-8'),
|
343 |
+
}
|
344 |
+
await websocket.send(json.dumps(event))
|
345 |
word = b''
|
346 |
print("line is completed")
|
347 |
event = {
|