Developer Day Notes 8: Making Life More Enjoyable With Python

by Jeremy Carbaugh

Basic intro to Python. REPL (like irb), scripts vs. modules, objects, sys module, sdist, PyPI (Python package dir), setuptools (based on distutils for install), pip (like gem/apt), virtualenv (virtual environments for your different Python projects). virtualenvwrapper (Bash scripts for common virtualenv tasks). (No details here because I’m familiar with Python and felt like saving on the typing. Also it was kind of dry, I think because the presenter was subbing in for a coworker.)

Final set of commands to get someone started at Sunlight Labs is:

$ mkvirtualenv labs
(labs)$ svn co http:///..../trunk/ sunlightlabs
(labs)$ cd sunlightlbags
(labs)$ pip install -r reqs.txt
(labs)$ mate .
(labs)$ ./manage.py runserver

Q&A:

Q: How would you compare to Ruby? A: Very similar but I don’t have the hands-on experience to compare and constrast.

Q: How do Python Eggs relate? A: Eggs are a very weird archive of your code, basically a zip file. But there are some really weird things, so more people avoid eggs.