couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Trivial Update of "ExternalProcesses" by PaulDavis
Date Sat, 31 Jan 2009 23:20:55 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by PaulDavis:
http://wiki.apache.org/couchdb/ExternalProcesses

The comment on the change is:
Added the note about simplejson vs. json in 2.6

------------------------------------------------------------------------------
  #! /usr/bin/env python
  
  import sys
- import simplejson
+ 
+ try:
+     # Python 2.6
+     import json
+ except:
+     # Prior to 2.6 requires simplejson
+     import simplejson as json
  
  def requests():
-     # `for line in sys.stdin` won't work here
+     # 'for line in sys.stdin' won't work here
      line = sys.stdin.readline()
      while line:
          yield simplejson.loads(line)

Mime
View raw message