<s> """<STR_LIT>""" <EOL> from percept . utils . input import import_from_string <EOL> from percept . conf . base import settings <EOL> import pickle <EOL> import logging <EOL> log = logging . getLogger ( __name__ ) <EOL> class BaseStore ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> self . data_path = settings . DATA_PATH <EOL> def save ( self , obj , id_code ) : <EOL> """<STR_LIT>""" <EOL> filestream = open ( '<STR_LIT>' . format ( self . data_path , id_code ) , '<STR_LIT>' ) <EOL> pickle . dump ( obj , filestream ) <EOL> filestream . close ( ) <EOL> def load ( self , id_code ) : <EOL> """<STR_LIT>""" <EOL> filestream = open ( '<STR_LIT>' . format ( self . data_path , id_code ) , '<STR_LIT:rb>' ) <EOL> workflow = pickle . load ( filestream ) <EOL> return workflow <EOL> class FileStore ( BaseStore ) : <EOL> """<STR_LIT>""" <EOL> pass </s>
