FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add tkinter.Canvas.tk_print() and tkinter.Text.tk_print() to expose the native print dialog · Issue #153256 · python/cpython · GitHub

Repository navigation

Add tkinter.Canvas.tk_print() and tkinter.Text.tk_print() to expose the native print dialog #153256

Closed

Description

Feature or enhancement

Tk 8.7/9.0 added the tk print command, which opens the native platform print dialog to print the contents of a canvas or text widget. tkinter currently has no interface to it.

I propose adding a tk_print() method to tkinter.Canvas and tkinter.Text (the only widgets tk print supports).

This complements the other native dialog wrappers in tkinter (tkinter.colorchooser, tkinter.filedialog, tkinter.fontchooser).

Tk manual: https://www.tcl-lang.org/man/tcl8.7/TkCmd/print.html

Linked PRs

Activity

  1. added a commit that references this issue on Jul 11, 2026
  2. terryjreedy commented on Jul 11, 2026

    Member

    I will add this to IDLE (20-year-old issue above). Could you (Claude?) look at Canvas.print for turtle? If that were added, a Print button could be conditionally added to the turtledemo frame.

  3. serhiy-storchaka commented on Jul 11, 2026

    MemberAuthor

    Note that in older Python versions you can use w.tk.call('tk', 'print', w) (do not work on Tk 8.6). w.tk_print() in main is just sugar.

  4. terryjreedy commented on Jul 11, 2026

    Member

    Great! See #43720 (comment)

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

    stdlibStandard Library Python modules in the Lib/ directorytopic-tkintertype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL