Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Teena - Unix in Python, powered by Tornado (github.com/zacharyvoase)
58 points by zacharyvoase on June 19, 2012 | hide | past | favorite | 3 comments



This 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.


Note 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.


Why tornado instead of asyncore? Tornado seems like a heavy dependency for this type of project.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: