def load_werkzeug(path):
 sys.path[0] = path
 wz.__dict__.clear()
 for key in sys.modules.keys():
  if (key.startswith('werkzeug.') or (key == 'werkzeug')):
   sys.modules.pop(key, None)
 import werkzeug
 for key in werkzeug.__all__:
  setattr(wz, key, getattr(werkzeug, key))
 hg_tag = find_hg_tag(path)
 try:
  f = open(os.path.join(path, 'setup.py'))
 except IOError:
  pass
 else:
  try:
   for line in f:
    line = line.strip()
    if line.startswith('version='):
     return (line[8:].strip('  DCTB ,')[1:(-1)], hg_tag)
  finally:
   f.close()
 print >>sys.stderr, 'Unknown werkzeug version loaded'
 sys.exit(2)

def load_werkzeug ( path ) : sys . path [ 0 ] = path wz . __dict__ . clear ( ) for key in sys . modules . keys ( ) : if ( key . startswith ( 'werkzeug.' ) or ( key == 'werkzeug' ) ) : sys . modules . pop ( key , None ) import werkzeug for key in werkzeug . __all__ : setattr ( wz , key , getattr ( werkzeug , key ) ) hg_tag = find_hg_tag ( path ) try : f = open ( os . path . join ( path , 'setup.py' ) ) except IOError : pass else : try : for line in f : line = line . strip ( ) if line . startswith ( 'version=' ) : return ( line [ 8 : ] . strip ( '  DCTB ,' ) [ 1 : ( - 1 ) ] , hg_tag ) finally : f . close ( ) print >> sys . stderr , 'Unknown werkzeug version loaded' sys . exit ( 2 )
load werkzeug .