Document getfp() function.
This commit is contained in:
parent
0fb5a3f826
commit
df9a381ae4
1 changed files with 1 additions and 0 deletions
|
@ -575,6 +575,7 @@ def writeFile(filename, content, encoding=None):
|
|||
raise OSError("empty content for file %s" % filename)
|
||||
|
||||
def getfp(filename, encoding):
|
||||
"""Get open file object."""
|
||||
if encoding:
|
||||
return codecs.open(filename, 'w', encoding)
|
||||
return open(filename, 'wb')
|
||||
|
|
Loading…
Reference in a new issue