Category: python

mysql_config not found osx

This always gets me when I try to install mysql-python on osx using pip:- $pip install mysql-python (ugly traceback, ending in:-) EnvironmentError: mysql_config not found Googling round finds that most people suggest editing a line in MySQL-python/site.cfg (wherever that is..), but my preferred solution is add the following line to my .profile:- export PATH=$PATH:/usr/local/mysql/bin This… Read more »

Running Google App Engine SDK on OSX lion

OSX Lion comes with python 2.7 as default. Although App Engine will run on 2.7, it is safer to develop on the version of python that your live app engine instances are running on, which in my case is python 2.5 currently. From a fresh install of Lion, I did the following:- Installed xcode via… Read more »

Get a list of attributes for a django object

For a queryset: myobj.objects.filter(foo=bar) myobj.values()[0].keys() For a single object instance:- for field in speaker._meta.fields: print field.name Also for a single object instance – returns fields and values as a dict speaker.__dict__ Iterate through the dict like above: for k,v in speaker.__dict__.iteritems(): print k,v

plone conference 2010 day 2

Some notes and thoughts from day of plone conference 2010. These are mostly in note form, but wanted to get these online anyway, while they are fresh in my mind. fixing the ungoogleable by Elizabeth Leddy What happens when something breaks, and a simple google search doesn’t offer any results? First, warn people (so they… Read more »

Plone Conference 2010 Day 1

Just back home after day one of Plone Conference 2010, with my mind buzzing so thought it would be a good time to write up some of my thoughts and notes. It was really difficult to choose between the talks on offer on the three different different tracks, but here are some thoughts on the… Read more »