|The main window of pyGtkPlot.|
Sunday, January 16, 2011
Monday, January 3, 2011
I was surprised by the lack of a way to read from a stream without blocking in Python, and this is the main reason why I'm writing this post. Some years ago I had the urge to open a two-way channel of communication between the program I was writing and an external command-line program (actually a GUI). I had solved this problem in mainly two different ways in C and C++ on Unix, by using pseudo-terminals in one case, and duplicated file descriptors in the other. Here we are going to create an object which inherits from a preexisting class which is provided by one of the modules for Python.