Skip to content

Instantly share code, notes, and snippets.

Mark Biggers biggers

Block or report user

Report or block biggers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
biggers /
Last active Jun 30, 2017 — forked from pmuller/
StreamLogger is a context handler which proxies an output stream to python's logging
#!/usr/bin/env python3
# Port of "Fabric streamlogger" to Python3
# Credit (originally):
# pmuller -
import sys
import logging
from io import StringIO
# encoding: utf-8
from __future__ import with_statement
import os
import sys
import datetime
from fabric.api import cd, run, prefix, task, env, get, roles
from fabric.colors import yellow, green
from contextlib import contextmanager as _contextmanager
from fabric.api import *
from fabric.context_managers import cd
from fabric.operations import local as lrun, sudo
from fabric.contrib.files import sed
from fabric.utils import warn
from local_fabfile import root, prod, lh, SERVER_IP
def virtualenv(command, run_directory=''):
if run_directory == '':
You can’t perform that action at this time.