def music(filename): """Return a (cached) music.Document instance for the specified file.""" c = _cached(filename) if c.music is None: import music c.music = music.Document(c.document) return c.music
def music(self): """Return the music.Document instance for our document.""" if self._music is None: import music doc = lydocument.Document(self.document()) self._music = music.Document(doc) self._music.include_path = self.includepath() return self._music