3 ms·
Show HN: Teena - Unix in Python, powered by Tornado
- zacharyvoase 14y agoNote from the author: this is still a work in progress, but I wanted to demonstrate that Tornado (and async I/O in general) is useful for more than just network servers.
- cheatercheater 14y agoI am not sure how that "is unix": how is an implementation of unix apis in python related to capturing http responses? I really like the idea but I'm missing this crucial piece of information to make sense out of the whole thing.
- chubot 14y agoThis is cool... I started something very similar to this 6 months ago. I took the Tornado event loop (rather than depending all of Tornado) and made it work with pipes, signals, and child processes (SIGCHLD mainly). I based it on the Node.js API. Node has the stream1.pipe(stream2) API which is very nice. And I think node has a tee() as well. Teena's API looks different at first glance -- I'll test it out and see what the advantages are. I wrote this since I have a server that it starting a lot of child processes and the only way to properly manage timeouts and unexpected child deaths is with an event loop. I didn't connect it to the server yet but I used it in another project which is like a better xargs -P (and better than GNU parallel). I'll put the code up at some point.
- infinite8s 14y agoWhy tornado instead of asyncore? Tornado seems like a heavy dependency for this type of project.