This post originated from an RSS feed registered with Python Buzz
by Michael Josephson.
Original Post: OnDemandAmazonList
Feed Title: SDJournal
Feed URL: http://www.sdjournal.com/archives/categories/languages/python/rss.xml
Feed Description: Posts from the Python category on SDJournal
Leonard Richardson recently emailed me a copy of OnDemandAmazonList, which can be used in conjection with PyAmazon to iterate over the results of an Amazon search as though it were a normal list.
Normally it's necessary to fetch the results from Amazon in batches by specifying a different value for the page parameter. Leonard's class abstracts this away by returning you results one at a time via the iterator's next() method which silently fetches the next lot of results from Amazon on demand as required.
This class can be downloaded from the Contributed Code section of the PyAmazon page.