import sys from os import system from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') if __name__ == "__main__": debug_mode = False counter = 1 if (len(sys.argv)) > 1: # print("There are arguments!") if ('d' == sys.argv[1]): debug_mode = True print(debug_mode) for line in sys.stdin: if (debug_mode): print(line, end =" ") logging.warning(line) if ((line.find("data: ")) > 0): print("\ndata block found!\n") data_block = line.split() print(data_block)