shutil.copyfileobj and sys.stdout

后端 未结 0 929
忘掉有多难
忘掉有多难 2021-02-20 02:20

The below code works fine with Python-2.7:

i = open(sys.argv[1], \'rb\')
o = sys.stdout

copyfileobj(i, o)

With Python-3.6 I get an error:

相关标签:
回答
  • 消灭零回复
提交回复
热议问题