Skip to content
Snippets Groups Projects
Commit ed8373c6 authored by Sibidharan's avatar Sibidharan :speech_balloon:
Browse files

Process output added and imports modified

parent f25c1f85
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ import socket ...@@ -2,6 +2,7 @@ import socket
from subprocess import Popen, STDOUT, PIPE from subprocess import Popen, STDOUT, PIPE
from threading import Thread from threading import Thread
from comm_thread import MathServerCommunicationThread from comm_thread import MathServerCommunicationThread
from comm_thread import ProcessOutputThread
HOST = '' HOST = ''
PORT = 4444 PORT = 4444
......
class ProcessOutputThread(Thread): #OOPS
def __init__(self, proc, conn):
Thread.__init__(self)
self.proc = proc
self.conn = conn
def run(self):
while not self.proc.stdout.closed and not self.conn._closed:
try:
self.conn.sendall(self.proc.stdout.readline())
except:
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment