Skip to content

Instantly share code, notes, and snippets.

@ivanitskiy
ivanitskiy / tornado_websocket_ee.py
Created November 6, 2015 18:11 — forked from gnpkrish/tornado_websocket_ee.py
Realtime Communicating with front-end using simple EventEmitter. With use of Tornado + Websocket.
"""
This is a simple example of WebSocket + Tornado + Simple EventEmitters usage.
Thanks to pyee by https://github.com/jesusabdullah
@Author:: Narayanaperumal G <[email protected]>
"""
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
from collections import defaultdict
@ivanitskiy
ivanitskiy / sub.py
Created November 6, 2015 18:10 — forked from FZambia/sub.py
tornado's Subprocess class usage example. Minimal Tornado's version required - 3.1
from __future__ import print_function
from tornado.gen import Task, Return, coroutine
import tornado.process
from tornado.ioloop import IOLoop
import subprocess
import time
STREAM = tornado.process.Subprocess.STREAM