Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE Text Output With ASCII Control Codes Not Working #68760

Closed
KevinPhillipskmecpp mannequin opened this issue Jul 6, 2015 · 4 comments
Closed

IDLE Text Output With ASCII Control Codes Not Working #68760

KevinPhillipskmecpp mannequin opened this issue Jul 6, 2015 · 4 comments
Labels
topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@KevinPhillipskmecpp
Copy link
Mannequin

KevinPhillipskmecpp mannequin commented Jul 6, 2015

BPO 24572
Nosy @terryjreedy, @vadmium
Superseder
  • bpo-23220: IDLE: Document how Shell displays user code output
  • Files
  • python_bug.png: This is what happens when the \r code is printed out to make an attemped progress stat. It appears as if each time the cursor is moved farther to the right (passed one of the Progress:'s) that the gray area between the text and the cursor gets larger
  • 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-07-11.01:59:03.693>
    created_at = <Date 2015-07-06.01:45:10.297>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE Text Output With ASCII Control Codes Not Working'
    updated_at = <Date 2015-07-11.06:12:29.523>
    user = 'https://bugs.python.org/KevinPhillipskmecpp'

    bugs.python.org fields:

    activity = <Date 2015-07-11.06:12:29.523>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-07-11.01:59:03.693>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2015-07-06.01:45:10.297>
    creator = 'Kevin Phillips (kmecpp)'
    dependencies = []
    files = ['39873']
    hgrepos = []
    issue_num = 24572
    keywords = []
    message_count = 4.0
    messages = ['246343', '246346', '246590', '246595']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'martin.panter', 'Kevin Phillips (kmecpp)']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '23220'
    type = 'behavior'
    url = 'https://bugs.python.org/issue24572'
    versions = ['Python 3.4']

    @KevinPhillipskmecpp
    Copy link
    Mannequin Author

    KevinPhillipskmecpp mannequin commented Jul 6, 2015

    This appears to be a bug with IDLE that happens when printing out ASCII codes. I posted the issue to stackoverflow when I came accross it because I didn't know what the problem was, so there is a more detailed description of the there: http://stackoverflow.com/q/31235670/3476226

    @KevinPhillipskmecpp KevinPhillipskmecpp mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error labels Jul 6, 2015
    @KevinPhillipskmecpp KevinPhillipskmecpp mannequin changed the title IDLE Bug IDLE Text Output Bug with ASCII Codes Jul 6, 2015
    @KevinPhillipskmecpp KevinPhillipskmecpp mannequin changed the title IDLE Text Output Bug with ASCII Codes IDLE Text Output With ASCII Codes Not Working Jul 6, 2015
    @vadmium
    Copy link
    Member

    vadmium commented Jul 6, 2015

    See also bpo-23220, specifically about the backspace control code.

    I understand the only control codes that Idle handles are newlines (line feed, \n) and tabs (\t).

    @vadmium vadmium changed the title IDLE Text Output With ASCII Codes Not Working IDLE Text Output With ASCII Control Codes Not Working Jul 6, 2015
    @terryjreedy
    Copy link
    Member

    Idle expands tabs to spaces, if asked to do so. It otherwise passes user code generated chars to tkinter, which passes them on to tk, which eventually passes them on to the OS gui widgets. I will say more on the existing issue.

    @terryjreedy
    Copy link
    Member

    To modify what I said, Idle only auto-expands literal tabs entered into an editor window with the Tab key. When one is doing such entry, all key sequences are subject to interception, so this is nothing special.

    Tabs chars put in a string with '\t' or '\x09' are not and should not be modified (except by explicit string methods. The issue here and in bpo-23220 is what happens when strings are written to a file object with print or file.write.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants