On 5 Jun 2012, at 11:18, Moritz Klammler wrote:
> Hello,
>
> in Python 3, this is a TypeError:
>
sys.stdout.write(b"hello, world\n")
>
> At the moment, argparse.FileType.__call__("-") unconditionally returns
> sys.stdout even if mode is binary so writing binary data will fail if
> the use
Hello,
in Python 3, this is a TypeError:
>>> sys.stdout.write(b"hello, world\n")
At the moment, argparse.FileType.__call__("-") unconditionally returns
sys.stdout even if mode is binary so writing binary data will fail if
the user selects to write it to stdout.
I'm not sure if this is the best