<s> import os . path as osp <EOL> from glob import glob <EOL> import waflib . Logs as msg <EOL> registered_defaults = dict ( ) <EOL> def load ( ) : <EOL> msg . debug ( '<STR_LIT>' ) <EOL> mydir = osp . dirname ( __file__ ) <EOL> for fpath in glob ( "<STR_LIT>" % mydir ) : <EOL> ffile = osp . basename ( fpath ) <EOL> modname = osp . splitext ( ffile ) [ <NUM_LIT:0> ] <EOL> msg . debug ( '<STR_LIT>' % modname ) <EOL> exec ( "<STR_LIT>" % modname ) <EOL> def defaults ( feats ) : <EOL> ret = dict ( ) <EOL> for toe in feats : <EOL> d = registered_defaults . get ( toe ) <EOL> if d : <EOL> ret . update ( d ) <EOL> return ret <EOL> def register_defaults ( name , ** kwds ) : <EOL> '''<STR_LIT>''' <EOL> registered_defaults [ name ] = kwds </s>
