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:
Victor Stinner 2010-05-25 21:32:42 +00:00
parent 73ffb8b552
commit 20f4b447f5
3 changed files with 40 additions and 2 deletions

View file

@ -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():