Skip to content

Instantly share code, notes, and snippets.

@nathyong
nathyong / tt.py
Last active August 29, 2015 14:08 — forked from C0mkid/tt.py
#!/usr/bin/python2.7
from subprocess import check_output, STDOUT, CalledProcessError, call
from sys import argv, stdout, stdin
def run(func):
"""Run a function and capture the output."""
if type(func) != type([]) and type(func) == type(""):
func = func.split(' ')