Ramesh-vani commited on
Commit
55fe60b
·
verified ·
1 Parent(s): ed5e23f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
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
- # event = {
297
- # "type": "terminal-data",
298
- # "data": "",
299
- # }
300
- # await websocket.send(json.dumps(event))
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
- # event = {
341
- # "type": "terminal-data",
342
- # "data": "",
343
- # }
344
- # await websocket.send(json.dumps(event))
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 = {