Python question (PyNoob)

Ant antroy at gmail.com
Mon Aug 20 03:45:25 EDT 2007


On Aug 20, 1:33 am, Anonymous <no.re... at here.com> wrote:
...
> 1). Data Munging (text processing) - instead of Perl

Check out the re module (regexes) in the standard library, and the
pyparsing third party library: http://pyparsing.wikispaces.com/ for
more complex stuff.

> 2). Automating my build process

You'll want to look into the os, sys and subprocess modules. The PMOTW
this week was subprocess: http://www.oreillynet.com/onlamp/blog/2007/08/pymotw_subprocess_1.html.
A few weeks back it covered os: http://blog.doughellmann.com/2007/05/pymotw-os.html.
In fact one of Doug Hellmann's previous articles on the getopt module
may also be useful if you want your build scripts to be controlled by
command line args: http://blog.doughellmann.com/2007/08/pymotw-getopt.html
(Though I prefer optparse personally).

> 3). (Possibly) some web data retrieval jobs

urllib, urllib2 and cookielib in the standard library should do most
of what you want, perhaps with the addition of beautiful soup if you
need to scrape the pages for data: http://www.crummy.com/software/BeautifulSoup/

HTH.

--
Ant...

http://antroy.blogspot.com/





More information about the Python-list mailing list