Skip to content

woosley/tonbsubprocess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nbsubprocess

a non-blocking subprocess lib for tornado

Usage

from nbsubprocess import NonBlockingSubprocess
from tornado.gen import Task, coroutine

class MyHandler(RequestHandler):
    @corotine
    def get(self):
        cmd = "echo hello && sleep 1 && echo goodbye"
        res = yield Task(NonBlockingSubprocess(cmd).loop)
        return_code = res.pipe.return_code
        output = res.output

Test

nose test.py

About

a non-blocking subprocess for tornado

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages