The Artima Developer Community
Sponsored Link

Python Buzz Forum
it's go time!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
maxim khesin

Posts: 251
Nickname: xamdam
Registered: Mar, 2005

Maxim Khesin is developer for Liquidnet. I like C++, python, attend design patterns study group/NYC.
it's go time! Posted: Mar 3, 2005 12:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by maxim khesin.
Original Post: it's go time!
Feed Title: python and the web
Feed URL: http://feeds.feedburner.com/PythonAndTheWeb
Feed Description: blog dedicated to python and the networks we live in
Latest Python Buzz Posts
Latest Python Buzz Posts by maxim khesin
Latest Posts From python and the web

Advertisement
To mix business with pleasure I wrote a small app that excercises my bfs implementation. The basic idea is to get related items from Amazon up to a given depth, starting with a keyword. The result is a graphviz DOT file, which is easily exported to other formats. E.g.

$ python test_amazon.py 'boost graph library' 3 BGL.dot

The results are here (png) (or here if you want the DOT file):

Prerequisites:
  • PyAmazon module from Mark Pilgrim. You will need an Amazon Associate account (easy to get). Once you get a key you can basically hardcode it into PyAmazon's amazon.py file, like this: LICENSE_KEY = 'your_license_key_here'
  • pygraphlib. While my library should eventually be a viable alternative to this, pygraphlib is a pretty good minimalistic library, and I could not get DOT output without it at this point
  • graphviz, if you want to view the DOT file.
  • my lib, in particular the bfs.py lib file and the driver test_amazon.py
As you can tell by the length of this program, this is the kind of thing Python shines at :).

Read: it's go time!

Topic: to throw, definitely Previous Topic   Next Topic Topic: M2Crypto Woes

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use