You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/02/01 00:20:55 UTC

[Couchdb Wiki] Trivial Update of "ExternalProcesses" by PaulDavis

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)