SF Cable Car Route Llamas, Alpacas and Mutants Fall Colors Mardi Himal Trail Golden Gate Zabriskie Point Prayer Flags Sunset Chinchero at Sunset Annapurna South in the Early Morning Fish Market Cementerio de Trenes de Uyuni Night Cats Sunset From Moro Rock Very rare deserted street Half Dome at Sunset Machhapuchhre Sunset from Marshall Beach, SF Grafitti The Danube at Night Annapurna South Under the Stars Mardi Himal Trail Rolling Fog Prepping to FIght Boudhanath Stupa Sheepherders and Annapurna South Cumhuriyet Anıtı Phewa Boats Alamo Square Bluebird Skies Stars Over Annapurna South White Mountains Sunset Fog Rolling In Half Dome at Sunset Vocano Scarred Mountains The Golden Gate at Night Old Man in Siding Twilight Fog Market Flags Bodie Eastern Sierras Under Shadow Snow and Shadows Temple Statue Marin Headlands Sand Dunes Hong Kong from the Peak Bay Area Sunrise Yosemite Fall Leaves Monument Valley Green River Canyons at Sunrise The Blue Mosque Buildings and a Bridge Cropped Crosswalk Headfirst Pisac Hillside The Buttermilks Rooster Fights at Forest Camp Resting Zabriskie Point Photographers Annapurna South

Checking for Python Package Updates at PyPI

April 01, 2012 —

I frequently find myself wondering if a bug in a Python package has been fixed and whether there is an upgrade for that package that might fix the bug. So I find that I end up running pip freeze and then having to compare the package versions to those on PyPI manually. Well, anytime you say "run X manually", you're being a chump.

I just saw down and wrote a script to get the list of currently installed packages in the current environment (so it works with virtualenv). Then it checks to see what the latest version of the package is on PyPI and prints out the status. If you work with Python and packages, this is awesomesauce.

I added the script to my dotfiles on github.

Assuming the script is at ~/bin/pyupgrades.py, you can run ...

read more

Python virtualenvwrapper and Logging

January 20, 2011 —

I ran into this issue, and couldn't find a resolution anywhere online. Well, I figured it out, and thought that I'd put it online for others to find.

The issue was that I got exception tracebacks when sourcing the /usr/local/bin/virtualenvwrapper.sh script upon bash initialization. However, the exception happens while Python is running it's atexit handlers. So the stack was only 3 levels deep. I'm running virtualenv and virtualenvwrapper on my Ubuntu 9.04 server.

Here's the output of the exception that I got:

read more