public marks

PUBLIC MARKS from roberto with tags python & recipe

November 2005

ASPN : Python Cookbook : Simple HTTP server supporting SSL secure communications

by 1 other
This recipe describes how to set up a simple HTTP server supporting SSL secure communications. It extends the SimpleHTTPServer standard module to support the SSL protocol. With this recipe, only the server is authenticated while the client remains unauthenticated (i.e. the server will not request a client certificate from the browser). So, the client (typically the browser) will be able to verify the server identity and secure its communications with the server.

October 2005

ASPN : Python Cookbook : Simple web request benchmark

This recipe measures the amount of time to perform each portion of a request to a single file many times, and prints the results in a somewhat reasonable fashion.

ASPN : Python Cookbook : Generator Based Concurrency, with Real Threads when Needed.

This recipe uses NanoThreads. http://lgt.berlios.de/ It shows how simulated concurrency, (using generators as tasks), can be transparently combined with OS Level Python threads, as and when needed.

ASPN : Python Cookbook : List comprehensions for database requests

The usual way to make a request to a database is to write a string with the SQL syntax, then execute this request and get the result as a list with cursor.fetchall() or cursor.fetchone() Python has list comprehensions to select items in an iterable if a certain condition is true ; this is very similar to database requests This recipe wraps a table of a DB-API compliant database in a class that implements the iteration protocol, so that you can use the for ... in ... if ... syntax

October 2004

Cache decorator in python 2.4

Recipe for memoized functions defined by decorators.

roberto's TAGS related to tag python

alsa +   apache +   array +   atom +   audio +   benchmark +   blog +   c +   cache +   cgi +   crypto +   css +   cups +   dap +   data +   db +   docs +   dods +   feed +   firefox +   flup +   fun +   games +   gmail +   gmt +   gnome +   google +   grads +   grant +   gstreamer +   html +   http +   ical +   ide +   im +   inkscape +   jabber +   javascript +   lan +   ldap +   lighttpd +   linux +   mac +   mail +   map +   math +   meta +   network +   nevow +   oceanography +   opendap +   openoffice +   os +   palm +   parsing +   photography +   php +   plone +   printing +   programming +   proxy +   pyblosxom +   pydap +   pydods +   rails +   recipe +   regexp +   rss +   ruby +   scanner +   science +   soap +   spam +   sparklines +   sql +   ssl +   svg +   template +   textile +   time +   traffic +   twisted +   unix +   video +   vim +   voip +   web +   webdav +   weblog +   wifi +   wiki +   windows +   WMS +   writing +   wsgi +   x +   xhtml +   xml +   zodb +   zope +