[Python-Dev] Incorrect documentation of the raw_input built-in function

skip at pobox.com skip at pobox.com
Thu Jan 24 18:47:53 CET 2008


    Isaac> Have people actually verified that the prompt is really sent to
    Isaac> stderr right now by using 2>/dev/null to attempt to suppress it?

Good point.  On my machine at work (Solaris), Python 2.4 seems to send its
raw_input prompt to stdout, not stderr:

    % python
    Python 2.4.2 (#1, Feb 23 2006, 12:48:31)
    [GCC 3.4.1] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> raw_input("?")
    ?z
    'z'
    >>>
    ink% python 2>/dev/null
    >>> raw_input("?")
    ?sdf
    'sdf'
    >>> ink% python >/dev/null
    Python 2.4.2 (#1, Feb 23 2006, 12:48:31)
    [GCC 3.4.1] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> raw_input("?")
    wer
    >>> ^D

Same for 2.6a0 on my Mac at home.  Mike, are you sure about it prompting to
stderr?  If so, what's your setup?

Skip


More information about the Python-Dev mailing list