def debugwrite(x):
 try:
  out = ctx.environ['wsgi.errors']
 except:
  out = sys.stderr
 out.write(x)

def debugwrite ( x ) : try : out = ctx . environ [ 'wsgi.errors' ] except : out = sys . stderr out . write ( x )
writes debug data to error stream .