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

ajax +   apache +   applications +   atmosphere +   atom +   audio +   benchmark +   best-post-of-the-year-nominee +   blog +   c +   cartography +   cgi +   clipboard +   crypto +   css +   dap +   data +   db +   dods +   escher +   flickr +   framework +   friends +   fun +   gaia +   games +   gis +   gmt +   gnome +   google +   grads +   graphviz +   homeostasis +   html +   http +   ical +   jabber +   javascript +   layout +   ldap +   linux +   mac +   mail +   math +   matlab +   meteorology +   moo +   mud +   network +   nevow +   oceanography +   opendap +   os +   palm +   parsing +   pda +   photography +   php +   postscript +   programming +   r +   rails +   reading +   recipe +   regexp +   rss +   ruby +   science +   soap +   spam +   sparklines +   sql +   subversion +   template +   textile +   threads +   time +   tutorial +   twisted +   unix +   usb +   vcalendar +   vcard +   video +   vim +   voip +   wavelet +   web +   webdav +   weblog +   wifi +   wiki +   windows +   writing +   wsgi +   wxpython +   x +   xhtml +   xml +   zope +