Skip to content

Instantly share code, notes, and snippets.

@smcv
smcv / gist:53a18b52a7ee9340ff18c15d048fbc13
Created May 2, 2018 12:18 — forked from TTimo/gist:267db48c0f20b06c6be1dfd05cd9ff56
File descriptor redirections and capture magic
#!/usr/bin/env python
# python 2.7 and >= 3.4 supported
from __future__ import print_function
import sys
if (sys.version_info < (3, 0)):
assert(sys.version_info >= (2, 7))
else: