code: def insert_file(self, file):
          
  
          if type(file) is bytes:
              file = open(file, 'r')
  
          self.insert_string(file.read())
docs: insert_file(file)
  
          Load resources entries from FILE, and insert them into the
          database.  FILE can be a filename (a string)or a file object.