Skip to content

PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout #57063

Closed

Description

@albertz
mannequin
BPO 12854
Nosy @albertz
Superseder
  • bpo-17620: Python interactive console doesn't use sys.stdin for input
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2015-08-08.14:22:29.127>
    created_at = <Date 2011-08-29.18:02:44.540>
    labels = ['type-bug']
    title = 'PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout'
    updated_at = <Date 2015-08-08.14:22:29.126>
    user = 'https://github.com/albertz'

    bugs.python.org fields:

    activity = <Date 2015-08-08.14:22:29.126>
    actor = 'eryksun'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-08-08.14:22:29.127>
    closer = 'eryksun'
    components = []
    creation = <Date 2011-08-29.18:02:44.540>
    creator = 'Albert.Zeyer'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 12854
    keywords = []
    message_count = 3.0
    messages = ['143168', '222229', '248270']
    nosy_count = 3.0
    nosy_names = ['BreamoreBoy', 'Albert.Zeyer', 'Drekin']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '17620'
    type = 'behavior'
    url = 'https://bugs.python.org/issue12854'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    Activity

    1. albertz commented on Aug 29, 2011

      albertzmannequin
      MannequinAuthor

      In Parser/tokenizer.c, there is PyOS_Readline(stdin, stdout, tok->prompt). This ignores any sys.stdin / sys.stdout overwrites.

      The usage should be like in Python/bltinmodule.c in builtin_raw_input.

    2. BreamoreBoy commented on Jul 3, 2014

      BreamoreBoymannequin
      Mannequin

      @Albert sorry about the delay in responding to this.

    3. Drekin commented on Aug 8, 2015

      Drekinmannequin
      Mannequin

      http://bugs.python.org/issue17620 is a duplicate, but with more discussion.

    4. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions