blocking

blocks – send input to python subprocess pipeline

blocks – send input to python subprocess pipeline Question: I’m testing subprocesses pipelines with python. I’m aware that I can do what the programs below do in python directly, but that’s not the point. I just want to test the pipeline so I know how to use it. My system is Linux Ubuntu 9.04 with …

Total answers: 11

How would you implement a basic event-loop?

How would you implement a basic event-loop? Question: If you have worked with gui toolkits, you know that there is a event-loop/main-loop that should be executed after everything is done, and that will keep the application alive and responsive to different events. For example, for Qt, you would do this in main(): int main() { …

Total answers: 7

Polling the keyboard (detect a keypress) in python

Polling the keyboard (detect a keypress) in python Question: How can I poll the keyboard from a console python app? Specifically, I would like to do something akin to this in the midst of a lot of other I/O activities (socket selects, serial port access, etc.): while True: # doing amazing pythonic embedded stuff # …

Total answers: 12