Efficient Threading

2014-11-14 Thread Empty Account
Hi, I am thinking about writing a load test tool in Python, so I am interested in how I can create the most concurrent threads/processes with the fewest OS resources. I would imagine that I/O would need to be non-blocking. There are a number of options including standard library threading, gevent

Flush stdin

2014-10-17 Thread Empty Account
Hi, I am using netcat to listen to a port and python to read stdin and print to the console. nc -l 2003 | python print_metrics.py sys.stdin.flush() doesn’t seem to flush stdin, so I am using the termios module. while True: input = sys.stdin.readline() # do some parsing … sys.stdout.