def import_js(path, lib_name, globals):
 with codecs.open(path_as_local(path), 'r', 'utf-8') as f:
  js = f.read()
 e = EvalJs()
 e.execute(js)
 var = e.context['var']
 globals[lib_name] = var.to_python()

def import_js ( path , lib_name , globals ) : with codecs . open ( path_as_local ( path ) , 'r' , 'utf-8' ) as f : js = f . read ( ) e = EvalJs ( ) e . execute ( js ) var = e . context [ 'var' ] globals [ lib_name ] = var . to_python ( )
imports from javascript source file .