def load(func):
def aux(self, *args, **kwargs):<EOL><INDENT>path = (hasattr(self, '<STR_LIT:path>') and self.path<EOL>or os.path.join(os.getcwd(), '<STR_LIT>'))<EOL>gpath = (hasattr(self, '<STR_LIT>') and self.gpath<EOL>or os.path.expanduser('<STR_LIT>'))<EOL>try:<EOL><INDENT>data = json.loads(open(path).read())<EOL><DEDENT>except IOError:<EOL><INDENT>data = devtodo(os.path.dirname(path))<EOL>if data is not None:<EOL><INDENT>self[:] = data<EOL><DEDENT>self.refs = dict()<EOL>self.options = dict()<EOL><DEDENT>else:<EOL><INDENT>self[:] = data['<STR_LIT>']<EOL>self.refs = data['<STR_LIT>']<EOL>self.options = data['<STR_LIT>']<EOL><DEDENT>try:<EOL><INDENT>self.globalOptions = json.loads(open(gpath).read())<EOL><DEDENT>except IOError:<EOL><INDENT>self.globalOptions = dict()<EOL><DEDENT>self.data = self._modifyInternal(<EOL>sort=self.options.get('<STR_LIT>') or self.globalOptions.get('<STR_LIT>'),<EOL>purge=self.options.get('<STR_LIT>') or self.globalOptions.get('<STR_LIT>'),<EOL>done=self.options.get('<STR_LIT>') or self.globalOptions.get('<STR_LIT>')<EOL>)<EOL>return func(self, *args, **kwargs)<EOL><DEDENT>return aux<EOL>
@decorator: Loads data before executing :func:.