mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Merged revisions 81533 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81533 | victor.stinner | 2010-05-25 23:12:34 +0200 (mar., 25 mai 2010) | 3 lines Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer and sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes API ........
This commit is contained in:
parent
73ffb8b552
commit
20f4b447f5
3 changed files with 40 additions and 2 deletions
|
|
@ -383,9 +383,9 @@ def main():
|
|||
if o == '-u': func = decode
|
||||
if o == '-t': test(); return
|
||||
if args and args[0] != '-':
|
||||
func(open(args[0], 'rb'), sys.stdout)
|
||||
func(open(args[0], 'rb'), sys.stdout.buffer)
|
||||
else:
|
||||
func(sys.stdin, sys.stdout)
|
||||
func(sys.stdin.buffer, sys.stdout.buffer)
|
||||
|
||||
|
||||
def test():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue