You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can see at now the commands are visible on the terminal but not on the GUI of the JARVIS.
The aim is to make the commands visible on the GUI of the JARVIS.
The text was updated successfully, but these errors were encountered:
This snippet of code will allow you to capture console output
usage:
sys.stdout = Unbuffered(YourOutputStream, sys.stdout, OptionalEchoStream)
you may pass sys.stdout as both 2nd and 3rd params to capture output as well as
have it still output to consolse. You can use on sys.stderr also.
Restore normal operation:
sys.stdout = sys.stdout.restore()
class Unbuffered(object):
def __init__(self, stream_out, original, echo_out=None):
self.oout = original
self.sout = stream_out
self.eout = echo_out
def write(self, data):
if self.sout is not None:
self.sout.write(data)
if self.eout is not None:
self.eout.write(data)
def writelines(self, datas):
self.write(''.join(datas))
def flush(self):
pass
def restore(self):
return self.oout
We can see at now the commands are visible on the terminal but not on the GUI of the JARVIS.
The aim is to make the commands visible on the GUI of the JARVIS.
The text was updated successfully, but these errors were encountered: