Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -297,6 +297,7 @@ async def read_process_output(process, websocket):
|
|
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")
|
@@ -312,6 +313,7 @@ async def read_process_output(process, websocket):
|
|
312 |
"type": "terminal-data",
|
313 |
"data": word.decode('utf-8'),
|
314 |
}
|
|
|
315 |
await websocket.send(json.dumps(event))
|
316 |
word = b''
|
317 |
print("space is occurred")
|
@@ -319,6 +321,7 @@ async def read_process_output(process, websocket):
|
|
319 |
"type": "terminal-data",
|
320 |
"data": " ",
|
321 |
}
|
|
|
322 |
await websocket.send(json.dumps(event))
|
323 |
elif char == b'':
|
324 |
if word:
|
@@ -327,6 +330,7 @@ async def read_process_output(process, websocket):
|
|
327 |
"type": "terminal-data",
|
328 |
"data": word.decode('utf-8'),
|
329 |
}
|
|
|
330 |
await websocket.send(json.dumps(event))
|
331 |
break
|
332 |
else:
|
|
|
297 |
"type": "terminal-data",
|
298 |
"data": word.decode('utf-8'),
|
299 |
}
|
300 |
+
print('sending data')
|
301 |
await websocket.send(json.dumps(event))
|
302 |
word = b''
|
303 |
print("line is completed")
|
|
|
313 |
"type": "terminal-data",
|
314 |
"data": word.decode('utf-8'),
|
315 |
}
|
316 |
+
print('sending data')
|
317 |
await websocket.send(json.dumps(event))
|
318 |
word = b''
|
319 |
print("space is occurred")
|
|
|
321 |
"type": "terminal-data",
|
322 |
"data": " ",
|
323 |
}
|
324 |
+
print('sending data')
|
325 |
await websocket.send(json.dumps(event))
|
326 |
elif char == b'':
|
327 |
if word:
|
|
|
330 |
"type": "terminal-data",
|
331 |
"data": word.decode('utf-8'),
|
332 |
}
|
333 |
+
print('sending data')
|
334 |
await websocket.send(json.dumps(event))
|
335 |
break
|
336 |
else:
|