Python debugger

If you want to use Python’s debugger, put in your code:

import ipdb;ipdb.set_trace()

Now it will goto debug mode in said file or object.

Install PyYAML on OSX – Mountain Lion

When trying to setup pyyaml on Mountain Lion, I kept seeing a yaml.h error:

my-macbook:reorganization me$ pip install pyyaml
Downloading/unpacking pyyaml
  Downloading PyYAML-3.10.tar.gz (241kB): 241kB downloaded
  Running setup.py egg_info for package pyyaml
    
Installing collected packages: pyyaml
  Running setup.py install for pyyaml
    checking if libyaml is compilable
    cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.8-x86_64-2.7/check_libyaml.c -o build/temp.macosx-10.8-x86_64-2.7/check_libyaml.o
    build/temp.macosx-10.8-x86_64-2.7/check_libyaml.c:2:10: fatal error: 'yaml.h' file not found
    #include 
             ^
    1 error generated.
    
    libyaml is not found or a compiler error: forcing --without-libyaml
    (if libyaml is installed correctly, you may need to
     specify the option --include-dirs or uncomment and
     modify the parameter include_dirs in setup.cfg)
    
Successfully installed pyyaml
Cleaning up...

Finally, I saw and did:

my-macbook:reorganization me$ sudo easy_install pip
my-macbook:reorganization me$ sudo brew install libyaml
my-macbook:reorganization me$ sudo easy_install setuptools
my-macbook:reorganization me$ pip install -U PyYAML