Fixed bug where newlines were stripped by accident by putting them back in.
authorJoseph Lenox <lenox.joseph@gmail.com>
Wed, 18 Apr 2018 23:34:48 +0000 (18:34 -0500)
committerJoseph Lenox <lenox.joseph@gmail.com>
Wed, 18 Apr 2018 23:34:48 +0000 (18:34 -0500)
smoothie-stream.py

index d46f133..c3b5017 100644 (file)
@@ -53,7 +53,7 @@ for line in f:
         line = re.sub("[ ]*;.*", '', line) # remove everything after ;
         line = line.strip() #send only the bare necessity.
     if len(line) > 0:
         line = re.sub("[ ]*;.*", '', line) # remove everything after ;
         line = line.strip() #send only the bare necessity.
     if len(line) > 0:
-        tn.write(line)
+        tn.write(line + "\n")
         linecnt+=1
         rep= tn.read_eager()
         okcnt += rep.count("ok")
         linecnt+=1
         rep= tn.read_eager()
         okcnt += rep.count("ok")