comparison configmix/ini.py @ 152:139fb1d1ef54

For compatibility reasons: provide a INIConfigParser.readfp() also
author Franz Glasner <hg@dom66.de>
date Sat, 14 Apr 2018 17:20:22 +0200
parents c46b0f82922a
children 4b10bd85610b
comparison
equal deleted inserted replaced
151:c46b0f82922a 152:139fb1d1ef54
70 return v.split(os.pathsep) 70 return v.split(os.pathsep)
71 71
72 def read(self, filenames): 72 def read(self, filenames):
73 """Not implemented. Use :meth:`read_file` instead""" 73 """Not implemented. Use :meth:`read_file` instead"""
74 raise NotImplementedError("use `read_file()' instead") 74 raise NotImplementedError("use `read_file()' instead")
75
76 def readfp(self, fp, filename):
77 """Compatibility for older Python versions.
78
79 Use :meth:`.read_file` instead.
80
81 """
82 return self.read_file(fp, filename)
75 83
76 def read_file(self, fp, filename): 84 def read_file(self, fp, filename):
77 """Read from a file-like object `fp`. 85 """Read from a file-like object `fp`.
78 86
79 The `fp` argument must be iterable (Python 3.2+) or have a 87 The `fp` argument must be iterable (Python 3.2+) or have a