def unflatten_envelope(packenv):
 i = iter(packenv)
 h = {}
 try:
  while True:
   k = i.next()
   h[k] = i.next()
 except StopIteration:
  return h

def unflatten_envelope ( packenv ) : i = iter ( packenv ) h = { } try : while True : k = i . next ( ) h [ k ] = i . next ( ) except StopIteration : return h
unflattens the rpc envelope .