Re: why isn't Unicode the default encoding?

2006-03-20 Thread Matt Goodall
.txt") >>> stream = codecs.getreader('utf-8')(f) >>> c = stream.read(1) The 'stream' works on unicode characters so 'c' is a unicode instance, i.e. a whole textual character. - Matt -- __ / \__ Matt Goodall, Pollenation Internet

Re: Any python HTML generator libs?

2006-03-10 Thread Matt Goodall
', 'color': 'blue'} > > print """\ > Section %(secnum)s > Elements of type %(type)s should be coloured %(color)s > """ % results Don't forget that you may need to escape the application's data for inclusion in HTML:

Re: Twisted book opinions?

2006-02-09 Thread Matt Goodall
Jay Parlar wrote: > I was hoping to get some c.l.p. opinions on O'Reilly's new Twisted book. I think it's a good book to get. I know a fair amount about Twisted but it still made for interesting reading. Tommi Virtanen (aka tv) posted a great review of the book shortly after it was published.

Re: psycopg2

2006-02-02 Thread Matt Goodall
remove the PSYCOPG_DEBUG from setup.cfg in the version you already have and reinstall. Hope this helps. - Matt -- __ / \__ Matt Goodall, Pollenation Internet Ltd \__/ \w: http://www.pollenation.net __/ \__/e: [EMAIL PROTECTED] / \__/ \t: +44 (0)113 2252500 \__/

Re: DB API and thread safety

2006-01-20 Thread Matt Goodall
essed by another thread then you need a dbapi module that supports threadsafety level 2 - "threads may share the module and connections". - Matt -- __ / \__ Matt Goodall, Pollenation Internet Ltd \__/ \w: http://www.pollenation.net __/ \__/e:

Re: recommended way of generating HTML from Python

2005-02-21 Thread Matt Goodall
emplating system that allows the Python developer to annotate XHTML templates using **valid XML**, i.e. no "for x in y" loops, no "if foo" conditionals, no "i = 0" variable setting, no expression evaluations, etc. The lovely thing about Nevow is that it encourages good se