<s> def load_plugins_at ( dir ) : <EOL> import os <EOL> import os . path <EOL> import re <EOL> home = os . path . dirname ( os . path . dirname ( __file__ ) ) <EOL> plugin_dir = os . path . join ( home , dir . replace ( '<STR_LIT:.>' , '<STR_LIT:/>' ) ) <EOL> plugins = os . listdir ( plugin_dir ) <EOL> plugins = [ re . sub ( r'<STR_LIT>' , '<STR_LIT>' , p ) for p in plugins if re . match ( r'<STR_LIT>' , p ) ] <EOL> for p in plugins : <EOL> __import__ ( dir + '<STR_LIT:.>' + p ) <EOL> def load_plugins ( ) : <EOL> load_plugins_at ( '<STR_LIT>' ) <EOL> load_plugins_at ( '<STR_LIT>' ) <EOL> load_plugins_at ( '<STR_LIT>' ) <EOL> load_plugins_at ( '<STR_LIT>' ) <EOL> load_plugins_at ( '<STR_LIT>' ) <EOL> load_plugins ( ) </s>
