tikitu + python   18

(b)logophile › Inferior decorating
Belatedly: blogged some decorator advice: (Also recently a gripe on list comprehensions: )
Python  from twitter
11 weeks ago by tikitu
(b)logophile › Python list incomprehension
Belatedly: blogged some decorator advice: (Also recently a gripe on list comprehensions: )
Python  from twitter
11 weeks ago by tikitu
(b)logophile › Python datetime conversions
I made this chart of related operations: (Someday may pack them all into a single utility.)
selfpromotion  python  from twitter
october 2011 by tikitu
Pexpect
Pexpect:
Pexpect is a pure Python module that makes Python a better tool for controlling and automating other programs… Pexpect is basically a pattern matching system. It runs programs and watches output. When output matches a given pattern Pexpect can respond as if a human were typing responses.
python  utilities  from google
july 2011 by tikitu
ScraperWiki
ScraperWiki:
ScraperWiki is a platform for writing and scheduling screen scrapers, and for storing the data they generate.

ScraperWiki lets you write your scraper in Python, PHP or Ruby, schedule scrapes and download scraped data in CSV format, as an SQLite3 database or via the API. You can fork existing scrapers too, Github-style.

Let’s say you wanted to grab all the URLs from link posts on the front page of One Thing Well and store them. Here’s how, in Python:

import scraperwiki
import lxml.html

root = scraperwiki.scrape('http://onethingwell.org/')
content = lxml.html.etree.HTML(root)
linkage = content.xpath("/html/body/div/article/h2/a/@href")

for links in linkage:
record = { "link" : links }
scraperwiki.datastore.save(["link"], record)

You can see the results on ScraperWiki.

And here’s another scraper—a bit more complex at 26 lines of code—which grabs the URLs from every link post on OTW by following the ‘Older’ link at the bottom of the page and parsing the next page until it reaches the last one.

I only know the very, very basics of Python, but the above scrapers were really easy to cobble together by following nicking code from the ScraperWiki tutorials and a bit of trial and error.

Have a go, and let me know if you make a cool scraper.
scraper  web  python  ruby  php  from google
march 2011 by tikitu
EmacsWiki: Category Extension Language
not so fast! claims and extensibility: ("sensible" I admit I don't know)
python  ruby  emacs  from twitter
november 2010 by tikitu
Python IAQ: Infrequently Answered Questions
Some really nice idioms/tricks: (perhaps a little outdated in a few cases)
Python  from twitter
september 2010 by tikitu
The Django Book: Version 2.0 (English)
Antiquariaat specialising in flower books. Den Haag.
books  free  django  reference  tutorial  python 
may 2010 by tikitu
Volity - Developer Information
System for developing and distributing multiplayer games. Zarf is involved.
games  perl  python  design  programming  tools 
april 2006 by tikitu
GameDev.net - How To Build a Game In A Week From Scratch With No Budget
Rapidfire developement postmortem -- mentions a few handy-looking Python tools (the game is called Hackenslash, 40 hrs dev time in 2005)
game  design  python  articles 
april 2006 by tikitu
PyChecker: a python source code checking tool
Some static checking of Python code (I can't believe mis-spelled assignment statements silently introduce variables!).
programming  tools  python  testing 
march 2006 by tikitu

Copy this bookmark:



description:


tags: