<s> """<STR_LIT>""" <EOL> class Auth : <EOL> def __init__ ( self ) : <EOL> self . haveParams = False ; <EOL> self . user = '<STR_LIT:user>' <EOL> self . port = <NUM_LIT> <EOL> self . host = '<STR_LIT:127.0.0.1>' <EOL> self . pwd = None <EOL> self . tryFileLoad ( '<STR_LIT>' ) ; <EOL> def setUser ( self , user ) : <EOL> self . user = user ; <EOL> def setHost ( self , host ) : <EOL> self . host = host ; <EOL> def setPort ( self , port ) : <EOL> self . port = port ; <EOL> def setIpPort ( self , ip , port ) : <EOL> self . host = ip ; <EOL> self . port = port ; <EOL> def setPwd ( self , pwd ) : <EOL> self . pwd = pwd ; <EOL> self . haveParams = True ; <EOL> def tryFileLoad ( self , filename ) : <EOL> with open ( filename , "<STR_LIT:r>" ) as fd : <EOL> for line in fd : <EOL> data = line . split ( ) ; <EOL> if len ( data ) != <NUM_LIT:2> : <EOL> print "<STR_LIT>" % ( line ) <EOL> continue ; <EOL> if data [ <NUM_LIT:0> ] == '<STR_LIT:port>' : <EOL> self . setPort ( int ( data [ <NUM_LIT:1> ] ) ) ; <EOL> elif data [ <NUM_LIT:0> ] == '<STR_LIT:host>' : <EOL> self . setHost ( data [ <NUM_LIT:1> ] ) ; <EOL> elif data [ <NUM_LIT:0> ] == '<STR_LIT>' : <EOL> self . setPwd ( data [ <NUM_LIT:1> ] ) ; <EOL> elif data [ <NUM_LIT:0> ] == '<STR_LIT:user>' : <EOL> self . setUser ( data [ <NUM_LIT:1> ] ) ; <EOL> else : <EOL> print "<STR_LIT>" % ( line ) <EOL> if not self . haveParams : <EOL> print "<STR_LIT>" <EOL> else : <EOL> print "<STR_LIT>" <EOL> return ; <EOL> print "<STR_LIT>" % ( filename ) ; </s>
