QR-Code Generator
-
I posted to delicious.com
QR-Code Generator
June 30 2010, 9:13am | Comments a>
-
I posted to stuart.woodward.jp
Python Generators
http://stuart.woodward.jp/?p=3101
divs = ( line.strip() for line in open("tmp.html") if line.find(">DIV")>0 ) for line in divs: print line
I started reading Apress Pro Python and immediately learned something new. I knew about Generators as a pattern for writing classes but I didn’t know you could make them on the fly and use in a similar way to List Comprehensions. The above code lists all the lines in an HTML file which contain a DIV tag, while stripping the white space off the start and end of the lines. Previously I would have written it in a much more clunky way. Yep. Nothing beats actually stepping away from the PC and reading a book.
- Tags:
- python
- programming
- Book
- generator
- apress
June 30 2010, 5:53am | Comments a>
-
I posted to delicious.com
txt2tags
http://txt2tags.sourceforge.net/index.html
Txt2tags is a document generator. It reads a text file with minimal markup as bold and //italic// and converts it to the following formats: HTML, XHTML, SGML, LaTeX, Lout, Man page, Wikipedia / MediaWiki ,Google Code Wiki,,DokuWiki,MoinMoin,MagicPoint, PageMaker, Plain text
- Tags:
- python
- writing
- tool
- wiki
- text
- conversion
- html
- utilities
- Txt2tags
- is
- a
- document
- generator
- It
- reads
- file
- with
- minimal
- markup
- as
- bold
- and
- //italic//
- converts
- to
- the
- foHTML
- XHTML
- SGML
- LaTeX
- Lout
- Manpage
- Wikipedia
- MediaWiki
- GoogleCode
- DokuWiki
- MoinMoin
- MagicPoint
- PageMaker
- Plain
- documentation
- format
February 7 2010, 4:58pm | Comments a>
1