Skip to content

Instantly share code, notes, and snippets.

@cablehead
Created March 22, 2015 20:53
Show Gist options
  • Save cablehead/5d62e72d0debcacd3235 to your computer and use it in GitHub Desktop.
Save cablehead/5d62e72d0debcacd3235 to your computer and use it in GitHub Desktop.
> python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vanilla
>>> h = vanilla.Hub()
>>> child = h.process.execv(['/usr/bin/env', 'grep', '--line-buffered', 'foo'])
>>> child.stdin.send('foo1\n')
>>> child.stdout.recv()
'foo1\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment