Installing MySQL-python in Snow Leopard

Here are the steps for installing MySQL-python in Snow leopard:

Untar downloaded Mysql-Python
cd [Mysql-Python path]
export PATH=/usr/local/mysql:$PATH
sudo ARCHFLAGS='-arch x86_64' python setup.py build
sudo ARCHFLAGS='-arch x86_64' python setup.py install

FYI: I have tested the installation in Python2.6.5
Enjoy

Installing Scipy, Numpy and Matplotlib in Snow Leopard

I had trouble installing Scipy in my Macbook(SnowLeopard). After googling, I endup into the site http://bit.ly/baCJUY .It solved my problem. Here is how i did it in simple way.

  1. Run the Python 2.6.4 installer.
  2. Run the NumPy 1.3.0 installer.
  3. Run the SciPy 0.7.1 installer.

Actual Source: http://bit.ly/bGSgBa

To install Matplotlib download matplotlib from here. Install the downloaded package and enjoy python scientific toolkits :) .

Experssion, Term and Item

Every time i study about Parse tree (Compiler deisgn/Theory of compuatation), I get confused what expression, term and item actually means. So i am blogging for my reference and hope it will be useful to others too.

  • An expression is a sum (with + or -) of terms.
  • A term is a product (with * or /) of items.
  • An item is either a number, or a variable name, or an expression enclosed in parentheses.