Created
February 11, 2013 11:29
-
-
Save bencord0/4753968 to your computer and use it in GitHub Desktop.
Bootstrap python basics. Use when installing a fresh python installation (such as pypy) on a system that doesn't come with python. i.e. windows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, | |
import urllib2 | |
def run_webscript(script_url): | |
script_file = os.path.basename(script_url) | |
with urllib2.urlopen(script_url) as u: | |
with open(script_file, 'w') as s: | |
s.write(u.read()) | |
execfile(script_file, dict(__file__=script_file)) | |
run_webscript('http://python-distribute.org/distribute_setup.py') | |
run_webscript('https://raw.github.com/pypa/pip/master/contrib/get-pip.py') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment