Esempio n. 1
0
 def to_stream(self):
     """returns a file object containing values"""
     file_obj = tempfile.TemporaryFile()
     save_encoding(file_obj, self.encoding)
     self.config.write(file_obj)
     file_obj.seek(0)
     return file_obj
Esempio n. 2
0
 def save(self, path):
     """fill document with information from .profile file"""
     profile_file = open(path, 'w')
     save_encoding(profile_file, self.encoding)
     self.config.write(profile_file)
     profile_file.close()