Skip to content

Instantly share code, notes, and snippets.

@prologic
Created May 11, 2015 11:22
Show Gist options
  • Save prologic/c0d6ca5d3d7fc421fef2 to your computer and use it in GitHub Desktop.
Save prologic/c0d6ca5d3d7fc421fef2 to your computer and use it in GitHub Desktop.
cat clone in circuits
import sys
from circuits.io import stdout, File, write
class Cat(File):
stdout = stdout
def read(self, data):
self.fire(write(data), stdout)
def eof(self):
raise SystemExit(0)
Cat(sys.argv[1]).run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment