This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Drekin, eryksun, ezio.melotti, paul.moore, steve.dower, terry.reedy, tim.golden, vstinner, zach.ware
Date 2016-10-08.01:01:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm sure Steve already has this covered, but FWIW here's a patch to call WriteConsoleW. Here's the result with the patch applied:

    >>> sys.ps1 = '»»» '
    »»» input("αβψδ: ")
    αβψδ: spam

and with interactive stdin and stdout/stderr redirected to a file:

    >amd64\python_d.exe >out.txt 2>&1
    input("αβψδ: ")

    >chcp 65001
    Active code page: 65001

    >type out.txt
    Python 3.6.0b1+ (default, Oct  7 2016, 23:47:58)
    [MSC v.1900 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> αβψδ: 'spam'

If it can't write the prompt for some reason (e.g. out of memory, decoding fails, WriteConsole fails), it doesn't fall back on fprintf to write the prompt. Should it? 

This should also get a test that calls ReadConsoleOutputCharacter to verify that the correct prompt is written.
Date User Action Args
2016-10-08 01:01:17eryksunsetrecipients: + eryksun, terry.reedy, paul.moore, vstinner, tim.golden, ezio.melotti, zach.ware, Drekin, steve.dower
2016-10-08 01:01:17eryksunsetmessageid: <>
2016-10-08 01:01:17eryksunlinkissue28333 messages
2016-10-08 01:01:16eryksuncreate