Python development on Windows – Setuptools & Pip configuration

Sometimes installing Python modules on Windows is a pain. You have seen the setuptools error message complaining that you don’t have Visual Studio 2003 installed? Yes, well then you have probably seen that the fix is easy:

python build –compiler=mingw32 install

But what if you want to install using easy_install or pip? or you want to use a pip requirements.txt file in a virtualenv? I have the solution for you.

First: Install MinGw including gcc, make and all the other regular goodies you would have on a Unix system.

Second: Add your \MinGw\bin directory to your path.

Third: If you are using an older version of Python (pre 2.6.6) you will have to manually set your HOME environment variable to your user directory…


Python – Convert a Dictionary to a List

We can easily create a Python list by pulling only the values out of a dictionary. This is done via the values() method.

>>> x = {‘a’:1, ‘b’:2}
>>> x
{‘a’: 1, ‘b’: 2}
>>> y = list(x.values())
>>> y
[(1), (2)…


Ruby on Rails + Gmail SMTP (TLS)

This took way too long to figure out the answer to without using a custom plugin. I hope this helps others! I was setting up Redmine with Gmail as an SMTP server utilizing config/email.yml. Behold!

email.yml with no other related changes in environment.yml using Rails 2.2.2

delivery_method: :smtp
enable_starttls_auto: :true
port: 587
authentication: :plain
tls: :true
user_name: “”
password: “YOURPASS”

If you are setting up Redmine, there is a nice feature under Administration > Settings > Email Notifications > and in the very bottom right corner of the page, a “Send a Test Email” link…


List of Free and cheap Subversion (SVN) repository hosts

So currently I am hosting 4 SVN repos on the same box as our web server. The server is maintained by me and gets backed up not nearly enough. So before I have a disaster and lose months of work I began looking to at least store my code somewhere safer. In my search to find SVN hosting this is what I found which can hopefully save you some searching:

  • XP Dev –  Completely free SVN repository hosting for projects smaller than 1.5 gbs. Free for Open Source and private projects, with any number of contributors. XP Dev offers a pretty impressive list of features for a free service including issue tracking, wikis and task management. Looks like a great and promising site. They


The beautiful phrase “Man, I am an idiot…”

How often do you have “Man, I am an idiot” moments? Forgetting to pay a bill on time, saying something stupid and regretting it immediately after, or chopping the tip of your finger off cutting red peppers? Yeah, gross… Well if I did either of those things I dont think I would be too happy but in the programming world “Man, I am an idiot” is one of the things I like to hear most…

Today my team and I were plugging away, coding up a storm. We have some upcoming deadlines so we are all in crunch mode. The problem is that if I have done a ton of work that is all on a  related task, I begin to make stupid errors. I dont know if that is normal…


Log4net app.config with console and file logging

Here is a quick example .config of log4net that does basic logging to the console and to a text file. I found a great tutorial outlining the config here but it didnt have a full example anywhere from what I found.…