“Python” Snippets

Babel number formatting performance test
18 July 2008
12:05
By cmlenz as Python
Keeping the Locale objects around helps quite a bit
Pygments highlighter for Genshi
17 July 2008
10:12
By cmlenz as Python
Just testing
Genshi server pages
15 July 2008
21:37
By cmlenz as Python (2 comments)
Serving “static” Genshi templates from mod_wsgi
Genshi test case
15 July 2008
08:55
By cmlenz as Python
Genshi caching filter
7 July 2008
20:00
By cmlenz as Python
Possible genshi.filters.cache module
PythonDoc Trac macro
27 June 2008
13:42
By cmlenz as Python
Trac macro that pulls a Python file from the repository, and uses compiler.ast to pull out API information
plural_to_python
10 June 2008
22:51
By cmlenz as Python
Genshi transforms with callbacks (example)
5 June 2008
19:55
By cmlenz as Python (1 comment)
Cleaned up AfterTransformation
5 June 2008
19:47
By cmlenz as Python
Trac auth MD5 weirdness
5 June 2008
11:58
By cmlenz as Python
scratchpad.py
6 April 2008
21:41
By as Python
Socket benchmark without httplib
26 March 2008
05:50
By Dave as Python (1 comment)
Poorly coded benchmark sample that uses sockets directly and sadly gives the same results as with httplib.
httplib Performance Tests
25 March 2008
15:24
By cmlenz as Python
You'd think that the second test function (test_shared) would run faster because it reuses the connection object across requests. However, when combined with chunked Transfer-Encoding, it is actually significantly slower on Linux (see next paste for results). On OS X it is faster, as expected.
helper function for Bitten coverage doctest
17 March 2008
17:25
By mgood as Python
Bitten cov annotator w/ fixed doctest
17 March 2008
17:24
By mgood as Python (1 comment)