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 doc: add section on developing tkinter apps. #75602

Closed
terryjreedy opened this issue Sep 11, 2017 · 3 comments
Closed

IDLE doc: add section on developing tkinter apps. #75602

terryjreedy opened this issue Sep 11, 2017 · 3 comments
Assignees
Labels
3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 31421
Nosy @terryjreedy, @cryvate
PRs
  • bpo-31421: Document how IDLE runs tkinter programs. #3513
  • [3.6] bpo-31421: Document how IDLE runs tkinter programs. (GH-3513) #3514
  • 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 = 'https://github.com/terryjreedy'
    closed_at = <Date 2017-09-12.13:45:52.528>
    created_at = <Date 2017-09-11.17:03:23.465>
    labels = ['expert-IDLE', 'type-feature', '3.7']
    title = 'IDLE doc: add section on developing tkinter apps.'
    updated_at = <Date 2017-09-12.13:45:52.527>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2017-09-12.13:45:52.527>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2017-09-12.13:45:52.528>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2017-09-11.17:03:23.465>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31421
    keywords = ['patch']
    message_count = 3.0
    messages = ['301888', '301956', '301960']
    nosy_count = 3.0
    nosy_names = ['terry.reedy', 'docs@python', 'cryvate']
    pr_nums = ['3513', '3514']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue31421'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    One of IDLE's great features is being able to interactively work with tkinter gui's because run calls update, without blocking, in the background. Document it in a new subsection, '3.5 Developing tkinter applications'.

    Adapt the following (written for a python-list response):

    Mainloop is a blocking call, and while it is running, one can only interact with the data and gui in ways that one has already programmed.  If you run the above with python -i, or equivalently, from an IDLE editor, you will not see a >>> prompt until you close the tk windows, at which point there is nothing left to interact with.
    
    However, if you run the code above from an IDLE editor, you can omit or comment out the mainloop call and still see the board, because IDLE's run code calls tk's update in a non-blocking manner about 20 times a second.  Without mainloop running, you immediately get a >>> prompt and can interact with the gui in a live exploratory fashion.  You can enter statements like the color assignment above, and the background updates will make them quickly take effect.

    @terryjreedy terryjreedy added the docs Documentation in the Doc dir label Sep 11, 2017
    @terryjreedy terryjreedy added 3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement and removed docs Documentation in the Doc dir labels Sep 11, 2017
    @terryjreedy
    Copy link
    Member Author

    New changeset 98758bc by Terry Jan Reedy in branch 'master':
    bpo-31421: Document how IDLE runs tkinter programs. (bpo-3513)
    98758bc

    @terryjreedy
    Copy link
    Member Author

    New changeset 4d7807a by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':
    [3.6] bpo-31421: Document how IDLE runs tkinter programs. (GH-3513) (bpo-3514)
    4d7807a

    @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
    3.7 (EOL) end of life topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant