Beispiel #1
0
 def __init__(self, type, match, formatter, line_number, global_options):
     LilypondSnippet.__init__(self, type, match, formatter, line_number,
                              global_options)
     self.filename = self.substring('filename')
     self.contents = file(
         BookBase.find_file(self.filename, global_options.include_path,
                            global_options.original_dir)).read()
Beispiel #2
0
 def get_contents(self) -> bytes:
     if not self.contents:
         self.contents = open(
             book_base.find_file(self.filename,
                                 self.global_options.include_path,
                                 self.global_options.original_dir),
             'rb').read()
     return self.contents
Beispiel #3
0
 def __init__ (self, type, match, formatter, line_number, global_options):
     LilypondSnippet.__init__ (self, type, match, formatter, line_number, global_options)
     self.filename = self.substring ('filename')
     self.contents = file (BookBase.find_file (self.filename,
         global_options.include_path, global_options.original_dir)).read ()
 def __init__ (self, type, match, formatter, line_number, global_options):
     LilypondSnippet.__init__ (self, type, match, formatter, line_number, global_options)
     self.filename = self.substring ('filename')
     self.ext = os.path.splitext (os.path.basename (self.filename))[1]
     self.contents = file (BookBase.find_file (self.filename, global_options.include_path)).read ()