Archives: January 2011

Steps to install Scrapy.

The following steps assumes that you already have python installed. To make your installation easy the steps recommend using easy_install tool. Install Scrapy 1. Download and install easy_install tool from cheeseshop . 2. Easy install “zope.interface” 3. Download and install Twisted 10.2.0 from Twisted site 4. Easy install “lxml” 5. Easy install “pyOpenSSL” 6. Easy

Read on »

Split a list using python zip function

I just found this trick. Say if you want to split a list with i number of elements into lists with j number of elements. It can easily be done with one liner using the python zip function. You just need to unzip the list specifying the “j”. See python documentation on zip for more

Read on »

Combine items in two list to form dictionary(map)

People love python because it has solutions built in for problems most frequently faced by developers. Python’s zip is one such thing. Gist: https://gist.github.com/rajaramanathan/a4e1b5b3531fd2b2cfab You would most probably need this in scenarios like csv file reading where the first row in the file is list of column names and subsequent are values. You know well

Read on »

Python objects and types

I’m one of the guy who needs to know the internals of a machine before using it. I can’t help it but that is my very nature. The following article that I refer to is not for faint heart (meaning beginners to programming or python) and is by far the best i’ve found ever that

Read on »