def load_pyfile(self, path):
with open(path) as config_file:<EOL><INDENT>contents = config_file.read()<EOL>try:<EOL><INDENT>exec(compile(contents, path, '<STR_LIT>'), self)<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise MalformedConfig(path, six.text_type(e))<EOL><DEDENT><DEDENT>
Load python file as config.

        Args:
            path (string): path to the python file