<s> """<STR_LIT>""" <EOL> from api import Wink <EOL> from auth import auth <EOL> from persist import ConfigFile <EOL> def login ( base_url = "<STR_LIT>" , config_file = "<STR_LIT>" ) : <EOL> """<STR_LIT>""" <EOL> auth_info = dict ( <EOL> base_url = base_url , <EOL> ) <EOL> for k in [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT:username>" , <EOL> "<STR_LIT:password>" , <EOL> ] : <EOL> auth_info [ k ] = raw_input ( "<STR_LIT>" % k ) <EOL> try : <EOL> auth_result = auth ( ** auth_info ) <EOL> except RuntimeError as e : <EOL> print "<STR_LIT>" <EOL> print e <EOL> else : <EOL> print "<STR_LIT>" <EOL> cf = ConfigFile ( config_file ) <EOL> cf . save ( auth_result ) <EOL> def init ( config_file = "<STR_LIT>" , debug = False ) : <EOL> """<STR_LIT>""" <EOL> cf = ConfigFile ( config_file ) <EOL> return Wink ( cf , debug = debug ) </s>
