From: Constantin Berhard Date: Mon, 30 Sep 2013 14:38:52 +0000 (+0200) Subject: developer shell added which doesn't do any magic X-Git-Url: https://git.ralfj.de/saartuer.git/commitdiff_plain/54fd262cfc0083de82a1367360a482f0a352138f?hp=07282bc03a4f1dfcd9309f2fa242dfecb2756a3b developer shell added which doesn't do any magic new file: tryshell --- diff --git a/tryshell b/tryshell new file mode 100755 index 0000000..3d4e3ed --- /dev/null +++ b/tryshell @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +import readline +import socket + +tuerSock = "/run/tuer.sock" + +while True: + command = input("# ") # EOFError used to exit + s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + s.connect(tuerSock) + s.send(command.encode()) + data = s.recv(64) + s.close() + print(str(data))