<s> from pywechat . services . wechat_shake import ShakeService <EOL> from pywechat . services . wechat_card import CardService <EOL> from pywechat . excepts import CodeBuildError <EOL> class WechatService ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , app_id , app_secret ) : <EOL> """<STR_LIT>""" <EOL> self . __app_id = app_id <EOL> self . __app_secret = app_secret <EOL> def init_service ( self , service_name ) : <EOL> """<STR_LIT>""" <EOL> services = { <EOL> '<STR_LIT>' : ShakeService , <EOL> '<STR_LIT>' : CardService <EOL> } <EOL> if not services . has_key ( service_name ) : <EOL> raise CodeBuildError ( '<STR_LIT>' ) <EOL> return services [ service_name ] ( self . __app_id , self . __app_secret ) </s>
