python、easy_installインストール
Windowsでpython開発環境を作るのはあんまり良くないのかな。やるならVMWarePlayer+Ubuntuでやった方がいいかも....
windowsでpython環境をつくる。あと集合知プログラミング21ページから使うpydeliciousのインストール。
Python2.5.2をインストールする
http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
Pathを通す(人によってはPython25かも)
C:\Python\
easy_installも入れる
mkdir C:\tmp cd /tmp wget http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py
easy_installもPathを通す
C:\Python\Scripts
集合知プログラミング 21ページのpydeliciousをインストールしたい
tortoise svn(http://tortoisesvn.net/downloads)で http://pydelicious.googlecode.com/svn/trunk/
をローカルに持ってくる
egg作りたいが、bdist_eggが通らない?
cd /tmp/pydelicious ./setup.py
するとfeedparserが無いのでインストールできないらしい
feedparserいれる
easy_install feedparser
./setup.py
これでpydelicious入ったらしい?
どこに入ったのかわからないので、
- pydelicious.pyc
- pydelicious.py
を
C:\Python\Lib
にコピーして
python対話コンソール起動、p21と同じように
import pydelicious pydelicious.get_popular(tag='programming')
やっとできた。
>>> pydelicious.get_popular(tag='programming') [{'count': '', 'extended': '', 'hash': '', 'description': u'GameDev.net - Start to Finish: Publishing a Commercial iPhone Game', 'tags': u'iphone programming ga me', 'href': u'http://www.gamedev.net/reference/articles/article2570.asp', 'user ': u'willie.rogers', 'dt': u'2008-10-16T18:13:47Z'}, {'count': '', 'extended': ' ', 'hash': '', 'description': u'This is How You Use the Google Maps API', 'tags' : u'programming walkthrough map maps php tutorial tutorials web2.0 webdesign web dev', 'href': u'http://nettuts.com/javascript-ajax/this-is-how-you-use-the-googl e-maps-api/', 'user': u'nkart', 'dt': u'2008-10-15T23:53:05Z'}, {'count': '', 'e xtended': '', 'hash': '', 'description': u"MIT's Introduction to Algorithms, Lec ture 12: Skip Lists - good coders code, great reuse", 'tags': u'mit lecture skip list programming algorithms datastructures', 'href': u'http://www.catonmat.net/b log/mit-introduction-to-algorithms-part-eight/', 'user': u'aaronbdavis', 'dt': u '2008-10-16T20:31:29Z'}, {'count': '', 'extended': '', 'hash': '', 'description' : u'Blackbird - Open Source JavaScript Logging Utility', 'tags': u'tool framewor k webdev ajax webdesign javascript js blackbird opensource programming', 'href': u'http://www.gscottolson.com/blackbirdjs/', 'user': u'japerk', 'dt': u'2008-10- 09T15:40:04Z'}, {'count': '', 'extended': '', 'hash': '', 'description': u'50 Ex cellent AJAX Tutorials | Tutorials | Smashing Magazine', 'tags': u'javascript cs s tutorials php webdesign programming tutorial webdev ajax webdevelopment', 'hre f': u'http://www.smashingmagazine.com/2008/10/16/50-excellent-ajax-tutorials/', 'user': u'pebbe', 'dt': u'2008-10-16T21:49:28Z'}, {'count': '', 'extended': '', 'hash': '', 'description': u'The Programming Aphorisms of Strunk and White', 'ta gs': u'strunk-and-white style hacking interesting language philosophy quality re ad tips writing', 'href': u'http://www.codingthewheel.com/archives/programming-a phorisms-of-strunk-and-white', 'user': u'petdance', 'dt': u'2008-10-13T22:01:44Z '}, {'count': '', 'extended': '', 'hash': '', 'description': u'Coding Horror: Pr eventing CSRF and XSRF Attacks', 'tags': u'codinghorror programming webdevelopme nt xsrf xss security', 'href': u'http://www.codinghorror.com/blog/archives/00117 5.html', 'user': u'ani625', 'dt': u'2008-09-02T07:10:08Z'}, {'count': '', 'exten ded': '', 'hash': '', 'description': u'Schneier on Security: How to Write Inject ion-Proof SQL', 'tags': u'mysql security database hack webapps progmatica code a rticle programming howto', 'href': u'http://www.schneier.com/blog/archives/2008/ 10/how_to_write_in.html', 'user': u'bajk', 'dt': u'2008-10-16T11:41:13Z'}, {'cou nt': '', 'extended': '', 'hash': '', 'description': u'Open Source Code Search En gine - Koders', 'tags': u'search opensource ruby perl php programming', 'href': u'http://www.koders.com/', 'user': u'phildog', 'dt': u'2004-10-25T11:58:33Z'}, { 'count': '', 'extended': '', 'hash': '', 'description': u"Scott Hanselman's Comp uter Zen - T4 (Text Template Transformation Toolkit) Code Generation - Best Kept Visual Studio Secret", 'tags': u'development programming tools tricks visualstu dio vs2008', 'href': u'http://www.hanselman.com/blog/T4TextTemplateTransformatio nToolkitCodeGenerationBestKeptVisualStudioSecret.aspx', 'user': u'owen.pellegrin .ni', 'dt': u'2008-10-14T20:18:14Z'}, {'count': '', 'extended': '', 'hash': '', 'description': u'Elastic tabstops - a better way to indent and align code', 'tag s': u'programming tools', 'href': u'http://nickgravgaard.com/elastictabstops/ind ex.html', 'user': u'notmuch', 'dt': u'2006-07-03T18:12:20Z'}, {'count': '', 'ext ended': '', 'hash': '', 'description': u'how_to_write_injection_proof_plsql.pdf (application/pdf Object)', 'tags': u'injection database sql development security programming', 'href': u'http://www.oracle.com/technology/tech/pl_sql/pdf/how_to _write_injection_proof_plsql.pdf', 'user': u'eddieawad', 'dt': u'2008-10-09T04:2 1:56Z'}]