Skip to content

Instantly share code, notes, and snippets.

View chroto's full-sized avatar
🦍

Chris Proto chroto

🦍
View GitHub Profile
@chroto
chroto / takeoff.py
Created November 25, 2011 21:19
Getting django projects started without fuss.
#! /usr/bin/env python
import os
import subprocess
import pprint
def use_virtualenv(virtualenv_path):
command = ['bash', '-c', 'source '+os.path.join(virtualenv_path,'bin','activate')+' && env']
proc = subprocess.Popen(command, stdout = subprocess.PIPE)
for line in proc.stdout:
(key, _, value) = line.partition("=")