chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
622e0fde-04d0-451b-94e9-34c9befcdd10 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,545 | supabase-export-v2 | 03337b489e3bf50d | the other event fields you can access, and how they are denoted in Tk, which can be useful when referring to the Tk man pages.
+----+---------------------+----+---------------------+
| Tk | Tkinter Event Field | Tk | Tkinter Event Field |
+====+=====================+====+=====================+
| %f | focus | %A | char ... | trusted_official_docs | CPython Docs | the other event fields you can access, and how they are denoted in Tk, which can be useful when referring to the Tk man pages.
+----+---------------------+----+---------------------+
| Tk | Tkinter Event Field | Tk | Tkinter Event Field |
+====+=====================+====+=====================+
| %f | focus | %A | char ... | the other event fields you can access, and how they are denoted in Tk, which can be useful when referring to the Tk man pages.
+----+---------------------+----+---------------------+
| Tk | Tkinter Event Field | Tk | Tkinter Event Field |
+====+=====================+====+=====================+
| %f | focus | %A | char ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6593dd90-7c0f-4c91-af88-61a12b8c1d6e | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,555 | supabase-export-v2 | eb1d1f8db37daf00 | * An integer preceded by ``@``, as in ``@6``, where the integer is interpreted as a y pixel coordinate in the menu's coordinate system;
* the string ``"none"``, which indicates no menu entry at all, most often used
with menu.activate() to deactivate all entries, and finally, | trusted_official_docs | CPython Docs | * An integer preceded by ``@``, as in ``@6``, where the integer is interpreted as a y pixel coordinate in the menu's coordinate system;
* the string ``"none"``, which indicates no menu entry at all, most often used
with menu.activate() to deactivate all entries, and finally, | * An integer preceded by ``@``, as in ``@6``, where the integer is interpreted as a y pixel coordinate in the menu's coordinate system;
* the string ``"none"``, which indicates no menu entry at all, most often used
with menu.activate() to deactivate all entries, and finally, | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
66668089-4929-4dfd-a687-4dc153986538 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,393 | supabase-export-v2 | 46855d3fe515817f | :mod:`tkinter.constants` Symbolic constants that can be used in place of strings when passing various parameters to Tkinter calls. Automatically imported by the main :mod:`!tkinter` module.
:mod:`tkinter.dnd`
(experimental) Drag-and-drop support for :mod:`!tkinter`. This will
become deprecated when it is replaced wit... | trusted_official_docs | CPython Docs | :mod:`tkinter.constants` Symbolic constants that can be used in place of strings when passing various parameters to Tkinter calls. Automatically imported by the main :mod:`!tkinter` module.
:mod:`tkinter.dnd`
(experimental) Drag-and-drop support for :mod:`!tkinter`. This will
become deprecated when it is replaced wit... | :mod:`tkinter.constants` Symbolic constants that can be used in place of strings when passing various parameters to Tkinter calls. Automatically imported by the main :mod:`!tkinter` module.
:mod:`tkinter.dnd`
(experimental) Drag-and-drop support for :mod:`!tkinter`. This will
become deprecated when it is replaced wit... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
66eebabe-e101-4d2e-9b6b-9719c9b3d6a9 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,446 | supabase-export-v2 | 6b592691b336704b | .frm.btn invoke .frm.lbl configure -text "Goodbye"
In the official Tcl/Tk reference documentation, you'll find most operations
that look like method calls on the man page for a specific widget (e.g.,
you'll find the :meth:`invoke` method on the
`ttk::button <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_button.htm>`_
man pag... | trusted_official_docs | CPython Docs | .frm.btn invoke .frm.lbl configure -text "Goodbye"
In the official Tcl/Tk reference documentation, you'll find most operations
that look like method calls on the man page for a specific widget (e.g.,
you'll find the :meth:`invoke` method on the
`ttk::button <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_button.htm>`_
man pag... | .frm.btn invoke .frm.lbl configure -text "Goodbye"
In the official Tcl/Tk reference documentation, you'll find most operations
that look like method calls on the man page for a specific widget (e.g.,
you'll find the :meth:`invoke` method on the
`ttk::button <https://www.tcl.tk/man/tcl8.6/TkCmd/ttk_button.htm>`_
man pag... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
670f6c17-7344-4e2a-917e-2c19583a019d | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,537 | supabase-export-v2 | 11036f7338ae6103 | you to watch for certain events and to have a callback function trigger when that event type occurs. The form of the bind method is::
def bind(self, sequence, func, add=''): | trusted_official_docs | CPython Docs | you to watch for certain events and to have a callback function trigger when that event type occurs. The form of the bind method is::
def bind(self, sequence, func, add=''): | you to watch for certain events and to have a callback function trigger when that event type occurs. The form of the bind method is::
def bind(self, sequence, func, add=''): | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6c60501b-adbe-40f5-9640-28874f22702b | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,519 | supabase-export-v2 | 28f050c4991661bd | anchor Legal values are points of the compass: ``"n"``, ``"ne"``, ``"e"``, ``"se"``, ``"s"``, ``"sw"``, ``"w"``, ``"nw"``, and also ``"center"``.
bitmap
There are eight built-in, named bitmaps: ``'error'``, ``'gray25'``,
``'gray50'``, ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``,
``'warning'``. To sp... | trusted_official_docs | CPython Docs | anchor Legal values are points of the compass: ``"n"``, ``"ne"``, ``"e"``, ``"se"``, ``"s"``, ``"sw"``, ``"w"``, ``"nw"``, and also ``"center"``.
bitmap
There are eight built-in, named bitmaps: ``'error'``, ``'gray25'``,
``'gray50'``, ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``,
``'warning'``. To sp... | anchor Legal values are points of the compass: ``"n"``, ``"ne"``, ``"e"``, ``"se"``, ``"s"``, ``"sw"``, ``"w"``, ``"nw"``, and also ``"center"``.
bitmap
There are eight built-in, named bitmaps: ``'error'``, ``'gray25'``,
``'gray50'``, ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``,
``'warning'``. To sp... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
726871a5-952e-4d0f-a370-cd777e59f707 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,404 | supabase-export-v2 | f1cb3e6ecff70b3a | a frame widget, which in this case will contain a label and a button we'll create next. The frame is fit inside the root window.
The next line creates a label widget holding a static text string. The
:meth:`grid` method is used to specify the relative layout (position) of the
label within its containing frame widget, s... | trusted_official_docs | CPython Docs | a frame widget, which in this case will contain a label and a button we'll create next. The frame is fit inside the root window.
The next line creates a label widget holding a static text string. The
:meth:`grid` method is used to specify the relative layout (position) of the
label within its containing frame widget, s... | a frame widget, which in this case will contain a label and a button we'll create next. The frame is fit inside the root window.
The next line creates a label widget holding a static text string. The
:meth:`grid` method is used to specify the relative layout (position) of the
label within its containing frame widget, s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
72d3f779-4928-4eb6-964f-9c18f9380b9f | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,573 | supabase-export-v2 | 94abf2d0bba3482d | .. method:: Widget.tk.createfilehandler(file, mask, func)
Registers the file handler callback function *func*. The *file* argument
may either be an object with a :meth:`~io.IOBase.fileno` method (such as
a file or socket object), or an integer file descriptor. The *mask*
argument is an ORed combination of any of the... | trusted_official_docs | CPython Docs | .. method:: Widget.tk.createfilehandler(file, mask, func)
Registers the file handler callback function *func*. The *file* argument
may either be an object with a :meth:`~io.IOBase.fileno` method (such as
a file or socket object), or an integer file descriptor. The *mask*
argument is an ORed combination of any of the... | .. method:: Widget.tk.createfilehandler(file, mask, func)
Registers the file handler callback function *func*. The *file* argument
may either be an object with a :meth:`~io.IOBase.fileno` method (such as
a file or socket object), or an integer file descriptor. The *mask*
argument is an ORed combination of any of the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
73eca23f-d709-4fcf-8352-590c05ea2de3 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,452 | supabase-export-v2 | cdc49508fb8d6612 | Python and Tcl/Tk have very different threading models, which :mod:`!tkinter` tries to bridge. If you use threads, you may need to be aware of this.
A Python interpreter may have many threads associated with it. In Tcl, multiple
threads can be created, but each thread has a separate Tcl interpreter instance
associated ... | trusted_official_docs | CPython Docs | Python and Tcl/Tk have very different threading models, which :mod:`!tkinter` tries to bridge. If you use threads, you may need to be aware of this.
A Python interpreter may have many threads associated with it. In Tcl, multiple
threads can be created, but each thread has a separate Tcl interpreter instance
associated ... | Python and Tcl/Tk have very different threading models, which :mod:`!tkinter` tries to bridge. If you use threads, you may need to be aware of this.
A Python interpreter may have many threads associated with it. In Tcl, multiple
threads can be created, but each thread has a separate Tcl interpreter instance
associated ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
740c2edb-fef9-4785-ba4a-3092849072b2 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,399 | supabase-export-v2 | 1b1fa2d13bf67f49 | A Hello World Program ^^^^^^^^^^^^^^^^^^^^^
We'll start by walking through a "Hello World" application in Tkinter. This
isn't the smallest one we could write, but has enough to illustrate some
key concepts you'll need to know. | trusted_official_docs | CPython Docs | A Hello World Program ^^^^^^^^^^^^^^^^^^^^^
We'll start by walking through a "Hello World" application in Tkinter. This
isn't the smallest one we could write, but has enough to illustrate some
key concepts you'll need to know. | A Hello World Program ^^^^^^^^^^^^^^^^^^^^^
We'll start by walking through a "Hello World" application in Tkinter. This
isn't the smallest one we could write, but has enough to illustrate some
key concepts you'll need to know. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
758f1a5a-0739-46ec-8d0f-cbe3ca874791 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,361 | supabase-export-v2 | 7e46e2d9c2fffdaf | Tkinter Modules ---------------
Support for Tkinter is spread across several modules. Most applications will need the
main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides
the modern themed widget set and API:: | trusted_official_docs | CPython Docs | Tkinter Modules ---------------
Support for Tkinter is spread across several modules. Most applications will need the
main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides
the modern themed widget set and API:: | Tkinter Modules ---------------
Support for Tkinter is spread across several modules. Most applications will need the
main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides
the modern themed widget set and API:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
765d5240-92dd-44df-8f14-27a74f737ecc | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,414 | supabase-export-v2 | d1075284b2d37c4f | and even refreshes the display only when actively running an *event loop*. If your program isn't running the event loop, your user interface won't update.
Understanding How Tkinter Wraps Tcl/Tk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | trusted_official_docs | CPython Docs | and even refreshes the display only when actively running an *event loop*. If your program isn't running the event loop, your user interface won't update.
Understanding How Tkinter Wraps Tcl/Tk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | and even refreshes the display only when actively running an *event loop*. If your program isn't running the event loop, your user interface won't update.
Understanding How Tkinter Wraps Tcl/Tk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
79b817eb-445b-42f6-bb39-2c77568c86ab | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,340 | supabase-export-v2 | f5147233790ef4e3 | .. note::
Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface components
along with a new API to use them. Both old and new APIs are still available. Most documentation you will find online still uses the old API and
can be woefully outdated. | trusted_official_docs | CPython Docs | .. note::
Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface components
along with a new API to use them. Both old and new APIs are still available. Most documentation you will find online still uses the old API and
can be woefully outdated. | .. note::
Tcl/Tk 8.5 (2007) introduced a modern set of themed user interface components
along with a new API to use them. Both old and new APIs are still available. Most documentation you will find online still uses the old API and
can be woefully outdated. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b3e29b7-adf1-455a-ab9e-cdd3e96aac5b | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,440 | supabase-export-v2 | 37d39bb266014b58 | Navigating the Tcl/Tk Reference Manual ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As noted, the official `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
reference manual (man pages) is often the most accurate description of what
specific operations on widgets do. Even when you know the name of the option
... | trusted_official_docs | CPython Docs | Navigating the Tcl/Tk Reference Manual ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As noted, the official `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
reference manual (man pages) is often the most accurate description of what
specific operations on widgets do. Even when you know the name of the option
... | Navigating the Tcl/Tk Reference Manual ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As noted, the official `Tk commands <https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm>`_
reference manual (man pages) is often the most accurate description of what
specific operations on widgets do. Even when you know the name of the option
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7ba262a1-15c6-4ea6-b692-2445b06d2844 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,337 | supabase-export-v2 | a6ac055766bc2cea | properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.
Tkinter supports a range of Tcl/Tk versions, built either with or
without thread support. The official Python binary release bundles Tcl/Tk 8.6
threaded. See the so... | trusted_official_docs | CPython Docs | properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.
Tkinter supports a range of Tcl/Tk versions, built either with or
without thread support. The official Python binary release bundles Tcl/Tk 8.6
threaded. See the so... | properly installed on your system, and also showing what version of Tcl/Tk is installed, so you can read the Tcl/Tk documentation specific to that version.
Tkinter supports a range of Tcl/Tk versions, built either with or
without thread support. The official Python binary release bundles Tcl/Tk 8.6
threaded. See the so... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7fab5534-5266-4c84-bf69-be97d2506b58 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,539 | supabase-export-v2 | f1d346dbd34e48f9 | target kind of event. (See the :manpage:`bind(3tk)` man page, and page 201 of John Ousterhout's book, :title-reference:`Tcl and the Tk Toolkit (2nd edition)`, for details).
func
is a Python function, taking one argument, to be invoked when the event occurs. An Event instance will be passed as the argument. (Functions ... | trusted_official_docs | CPython Docs | target kind of event. (See the :manpage:`bind(3tk)` man page, and page 201 of John Ousterhout's book, :title-reference:`Tcl and the Tk Toolkit (2nd edition)`, for details).
func
is a Python function, taking one argument, to be invoked when the event occurs. An Event instance will be passed as the argument. (Functions ... | target kind of event. (See the :manpage:`bind(3tk)` man page, and page 201 of John Ousterhout's book, :title-reference:`Tcl and the Tk Toolkit (2nd edition)`, for details).
func
is a Python function, taking one argument, to be invoked when the event occurs. An Event instance will be passed as the argument. (Functions ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
83acaf5c-d6a7-4c56-96e0-a7a14e292064 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,420 | supabase-export-v2 | 833e3243a87c97cc | 10 grid .frm grid [ttk::label .frm.lbl -text "Hello World!"] -column 0 -row 0 grid [ttk::button .frm.btn -text "Quit" -command "destroy ."] -column 1 -row 0
Tcl's syntax is similar to many shell languages, where the first word is the
command to be executed, with arguments to that command following it, separated
by spac... | trusted_official_docs | CPython Docs | 10 grid .frm grid [ttk::label .frm.lbl -text "Hello World!"] -column 0 -row 0 grid [ttk::button .frm.btn -text "Quit" -command "destroy ."] -column 1 -row 0
Tcl's syntax is similar to many shell languages, where the first word is the
command to be executed, with arguments to that command following it, separated
by spac... | 10 grid .frm grid [ttk::label .frm.lbl -text "Hello World!"] -column 0 -row 0 grid [ttk::button .frm.btn -text "Quit" -command "destroy ."] -column 1 -row 0
Tcl's syntax is similar to many shell languages, where the first word is the
command to be executed, with arguments to that command following it, separated
by spac... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
861d105b-1ee3-4e9a-b318-03467c39ce9d | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,457 | supabase-export-v2 | c6b15780203455df | A number of special cases exist:
* Tcl/Tk libraries can be built so they are not thread-aware. In this case,
:mod:`!tkinter` calls the library from the originating Python thread, even
if this is different than the thread that created the Tcl interpreter. A global
lock ensures only one call occurs at a time. | trusted_official_docs | CPython Docs | A number of special cases exist:
* Tcl/Tk libraries can be built so they are not thread-aware. In this case,
:mod:`!tkinter` calls the library from the originating Python thread, even
if this is different than the thread that created the Tcl interpreter. A global
lock ensures only one call occurs at a time. | A number of special cases exist:
* Tcl/Tk libraries can be built so they are not thread-aware. In this case,
:mod:`!tkinter` calls the library from the originating Python thread, even
if this is different than the thread that created the Tcl interpreter. A global
lock ensures only one call occurs at a time. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86aa9ce9-9aa2-4e34-849d-1fef649fec1e | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,427 | supabase-export-v2 | f7fe6bef60fddf4d | How do I...? What option does...? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you're not sure how to do something in Tkinter, and you can't immediately
find it in the tutorial or reference documentation you're using, there are a
few strategies that can be helpful. | trusted_official_docs | CPython Docs | How do I...? What option does...? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you're not sure how to do something in Tkinter, and you can't immediately
find it in the tutorial or reference documentation you're using, there are a
few strategies that can be helpful. | How do I...? What option does...? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you're not sure how to do something in Tkinter, and you can't immediately
find it in the tutorial or reference documentation you're using, there are a
few strategies that can be helpful. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
872d19e5-0d73-4025-9774-dcedf7551375 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,429 | supabase-export-v2 | d17b790da94a6cd1 | different versions of both Tkinter and Tcl/Tk. If you're searching documentation, make sure it corresponds to the Python and Tcl/Tk versions installed on your system.
When searching for how to use an API, it helps to know the exact name of the
class, option, or method that you're using. Introspection, either in an
inte... | trusted_official_docs | CPython Docs | different versions of both Tkinter and Tcl/Tk. If you're searching documentation, make sure it corresponds to the Python and Tcl/Tk versions installed on your system.
When searching for how to use an API, it helps to know the exact name of the
class, option, or method that you're using. Introspection, either in an
inte... | different versions of both Tkinter and Tcl/Tk. If you're searching documentation, make sure it corresponds to the Python and Tcl/Tk versions installed on your system.
When searching for how to use an API, it helps to know the exact name of the
class, option, or method that you're using. Introspection, either in an
inte... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
88360209-8c56-4038-beb3-04c6ca0b1c03 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,571 | supabase-export-v2 | 06775efc41553bcd | This feature is not available on Windows.
Since you don't know how many bytes are available for reading, you may not
want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase`
:meth:`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods,
since these will insist on reading a predefined number of by... | trusted_official_docs | CPython Docs | This feature is not available on Windows.
Since you don't know how many bytes are available for reading, you may not
want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase`
:meth:`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods,
since these will insist on reading a predefined number of by... | This feature is not available on Windows.
Since you don't know how many bytes are available for reading, you may not
want to use the :class:`~io.BufferedIOBase` or :class:`~io.TextIOBase`
:meth:`~io.BufferedIOBase.read` or :meth:`~io.IOBase.readline` methods,
since these will insist on reading a predefined number of by... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8cafad74-252a-4949-b771-da9d84706298 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,397 | supabase-export-v2 | 002e1d223a22d5ab | section provides a very quick orientation to what a Tkinter application looks like, identifies foundational Tk concepts, and explains how the Tkinter wrapper is structured.
The remainder of this section will help you to identify the classes,
methods, and options you'll need in your Tkinter application, and where to
fin... | trusted_official_docs | CPython Docs | section provides a very quick orientation to what a Tkinter application looks like, identifies foundational Tk concepts, and explains how the Tkinter wrapper is structured.
The remainder of this section will help you to identify the classes,
methods, and options you'll need in your Tkinter application, and where to
fin... | section provides a very quick orientation to what a Tkinter application looks like, identifies foundational Tk concepts, and explains how the Tkinter wrapper is structured.
The remainder of this section will help you to identify the classes,
methods, and options you'll need in your Tkinter application, and where to
fin... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8dd53e61-a6c1-42c4-8201-a110aa1ce6d1 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,528 | supabase-export-v2 | 2c85dc526fe1c360 | the form ``widthxheight``, where width and height are measured in pixels for most widgets (in characters for widgets displaying text). For example: ``fred["geometry"] = "200x100"``.
justify
Legal values are the strings: ``"left"``, ``"center"``, and ``"right"``. | trusted_official_docs | CPython Docs | the form ``widthxheight``, where width and height are measured in pixels for most widgets (in characters for widgets displaying text). For example: ``fred["geometry"] = "200x100"``.
justify
Legal values are the strings: ``"left"``, ``"center"``, and ``"right"``. | the form ``widthxheight``, where width and height are measured in pixels for most widgets (in characters for widgets displaying text). For example: ``fred["geometry"] = "200x100"``.
justify
Legal values are the strings: ``"left"``, ``"center"``, and ``"right"``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8fcab48a-9cef-4d83-ba01-9e920ec65e40 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,357 | supabase-export-v2 | 8e255aa7f9707f9c | it. Tk's widgets are very customizable, though at the cost of a dated appearance. Tk uses Tcl's event queue to generate and process GUI events.
Ttk
Themed Tk (Ttk) is a newer family of Tk widgets that provide a much better
appearance on different platforms than many of the classic Tk widgets. Ttk is distributed as pa... | trusted_official_docs | CPython Docs | it. Tk's widgets are very customizable, though at the cost of a dated appearance. Tk uses Tcl's event queue to generate and process GUI events.
Ttk
Themed Tk (Ttk) is a newer family of Tk widgets that provide a much better
appearance on different platforms than many of the classic Tk widgets. Ttk is distributed as pa... | it. Tk's widgets are very customizable, though at the cost of a dated appearance. Tk uses Tcl's event queue to generate and process GUI events.
Ttk
Themed Tk (Ttk) is a newer family of Tk widgets that provide a much better
appearance on different platforms than many of the classic Tk widgets. Ttk is distributed as pa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8ffaf7aa-8361-4e18-9e85-79a0d0dcc79d | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,365 | supabase-export-v2 | c16d9f39808cc07a | which is usually the main window of an application, and initialize a Tcl interpreter for this widget. Each instance has its own associated Tcl interpreter.
The :class:`Tk` class is typically instantiated using all default values. However, the following keyword arguments are currently recognized: | trusted_official_docs | CPython Docs | which is usually the main window of an application, and initialize a Tcl interpreter for this widget. Each instance has its own associated Tcl interpreter.
The :class:`Tk` class is typically instantiated using all default values. However, the following keyword arguments are currently recognized: | which is usually the main window of an application, and initialize a Tcl interpreter for this widget. Each instance has its own associated Tcl interpreter.
The :class:`Tk` class is typically instantiated using all default values. However, the following keyword arguments are currently recognized: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
916d3b8b-0b98-4d4c-9d1a-055ecd292ada | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,508 | supabase-export-v2 | c9bf125af53485ce | .. index:: single: window manager (widgets)
In Tk, there is a utility command, ``wm``, for interacting with the window
manager. Options to the ``wm`` command allow you to control things like titles,
placement, icon bitmaps, and the like. In :mod:`!tkinter`, these commands have
been implemented as methods on the :class:... | trusted_official_docs | CPython Docs | .. index:: single: window manager (widgets)
In Tk, there is a utility command, ``wm``, for interacting with the window
manager. Options to the ``wm`` command allow you to control things like titles,
placement, icon bitmaps, and the like. In :mod:`!tkinter`, these commands have
been implemented as methods on the :class:... | .. index:: single: window manager (widgets)
In Tk, there is a utility command, ``wm``, for interacting with the window
manager. Options to the ``wm`` command allow you to control things like titles,
placement, icon bitmaps, and the like. In :mod:`!tkinter`, these commands have
been implemented as methods on the :class:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
91b7f703-fb96-44c9-97e5-43ca414bcd9c | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,455 | supabase-export-v2 | 582c2ea7033eb499 | another thread. This is different from many GUI toolkits where the GUI runs in a completely separate thread from all application code including event handlers.
If the Tcl interpreter is not running the event loop and processing events, any
:mod:`!tkinter` calls made from threads other than the one running the Tcl
inter... | trusted_official_docs | CPython Docs | another thread. This is different from many GUI toolkits where the GUI runs in a completely separate thread from all application code including event handlers.
If the Tcl interpreter is not running the event loop and processing events, any
:mod:`!tkinter` calls made from threads other than the one running the Tcl
inter... | another thread. This is different from many GUI toolkits where the GUI runs in a completely separate thread from all application code including event handlers.
If the Tcl interpreter is not running the event loop and processing events, any
:mod:`!tkinter` calls made from threads other than the one running the Tcl
inter... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
92a9b5c1-c961-4751-8e93-1e3d4ebf1965 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,473 | supabase-export-v2 | 8845655ad42e1b58 | to many widgets, the latter are the options that are idiosyncratic to that particular widget. The Standard Options are documented on the :manpage:`options(3)` man page.
No distinction between standard and widget-specific options is made in this
document. Some options don't apply to some kinds of widgets. Whether a give... | trusted_official_docs | CPython Docs | to many widgets, the latter are the options that are idiosyncratic to that particular widget. The Standard Options are documented on the :manpage:`options(3)` man page.
No distinction between standard and widget-specific options is made in this
document. Some options don't apply to some kinds of widgets. Whether a give... | to many widgets, the latter are the options that are idiosyncratic to that particular widget. The Standard Options are documented on the :manpage:`options(3)` man page.
No distinction between standard and widget-specific options is made in this
document. Some options don't apply to some kinds of widgets. Whether a give... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
954af496-666c-4f62-bea3-3b76abf3c88b | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,441 | supabase-export-v2 | 8a65e5a992e11c64 | widgets do. Even when you know the name of the option or method that you need, you may still have a few places to look.
While all operations in Tkinter are implemented as method calls on widget
objects, you've seen that many Tcl/Tk operations appear as commands that
take a widget pathname as its first parameter, follow... | trusted_official_docs | CPython Docs | widgets do. Even when you know the name of the option or method that you need, you may still have a few places to look.
While all operations in Tkinter are implemented as method calls on widget
objects, you've seen that many Tcl/Tk operations appear as commands that
take a widget pathname as its first parameter, follow... | widgets do. Even when you know the name of the option or method that you need, you may still have a few places to look.
While all operations in Tkinter are implemented as method calls on widget
objects, you've seen that many Tcl/Tk operations appear as commands that
take a widget pathname as its first parameter, follow... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
96c46401-6301-4036-be9f-8edb9e441f49 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,425 | supabase-export-v2 | dffbbd1be26a7e91 | window is just ``.`` (dot). In Tkinter, the hierarchy is defined not by pathname but by specifying the parent widget when creating each child widget.
* Operations which are implemented as separate *commands* in Tcl (like
``grid`` or ``destroy``) are represented as *methods* on Tkinter widget
objects. As you'll see sh... | trusted_official_docs | CPython Docs | window is just ``.`` (dot). In Tkinter, the hierarchy is defined not by pathname but by specifying the parent widget when creating each child widget.
* Operations which are implemented as separate *commands* in Tcl (like
``grid`` or ``destroy``) are represented as *methods* on Tkinter widget
objects. As you'll see sh... | window is just ``.`` (dot). In Tkinter, the hierarchy is defined not by pathname but by specifying the parent widget when creating each child widget.
* Operations which are implemented as separate *commands* in Tcl (like
``grid`` or ``destroy``) are represented as *methods* on Tkinter widget
objects. As you'll see sh... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9fe56a13-42a3-4bfa-971b-5397f96f04c1 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,549 | supabase-export-v2 | bffb8fa3ddb6e6ea | options that refer to character positions in the text being displayed. You can use these :mod:`!tkinter` functions to access these special points in text widgets:
Text widget indexes
The index notation for Text widgets is very rich and is best described in the Tk
man pages. | trusted_official_docs | CPython Docs | options that refer to character positions in the text being displayed. You can use these :mod:`!tkinter` functions to access these special points in text widgets:
Text widget indexes
The index notation for Text widgets is very rich and is best described in the Tk
man pages. | options that refer to character positions in the text being displayed. You can use these :mod:`!tkinter` functions to access these special points in text widgets:
Text widget indexes
The index notation for Text widgets is very rich and is best described in the Tk
man pages. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a11a6920-fcd4-4146-bd48-237a8cdc4d77 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,390 | supabase-export-v2 | 13d388e6de01be84 | .. module:: _tkinter :synopsis: A binary module that contains the low-level interface to Tcl/Tk.
:mod:`_tkinter`
A binary module that contains the low-level interface to Tcl/Tk. It is automatically imported by the main :mod:`!tkinter` module,
and should never be used directly by application programmers. It is usually... | trusted_official_docs | CPython Docs | .. module:: _tkinter :synopsis: A binary module that contains the low-level interface to Tcl/Tk.
:mod:`_tkinter`
A binary module that contains the low-level interface to Tcl/Tk. It is automatically imported by the main :mod:`!tkinter` module,
and should never be used directly by application programmers. It is usually... | .. module:: _tkinter :synopsis: A binary module that contains the low-level interface to Tcl/Tk.
:mod:`_tkinter`
A binary module that contains the low-level interface to Tcl/Tk. It is automatically imported by the main :mod:`!tkinter` module,
and should never be used directly by application programmers. It is usually... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a1de385b-a1dd-4d07-85be-1b9bde4f9513 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,392 | supabase-export-v2 | 00cd80622ba9731a | :mod:`idlelib` Python's Integrated Development and Learning Environment (IDLE). Based on :mod:`!tkinter`.
:mod:`tkinter.constants`
Symbolic constants that can be used in place of strings when passing
various parameters to Tkinter calls. Automatically imported by the
main :mod:`!tkinter` module. | trusted_official_docs | CPython Docs | :mod:`idlelib` Python's Integrated Development and Learning Environment (IDLE). Based on :mod:`!tkinter`.
:mod:`tkinter.constants`
Symbolic constants that can be used in place of strings when passing
various parameters to Tkinter calls. Automatically imported by the
main :mod:`!tkinter` module. | :mod:`idlelib` Python's Integrated Development and Learning Environment (IDLE). Based on :mod:`!tkinter`.
:mod:`tkinter.constants`
Symbolic constants that can be used in place of strings when passing
various parameters to Tkinter calls. Automatically imported by the
main :mod:`!tkinter` module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a34c1929-98a2-461c-9371-94075b785e1e | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,503 | supabase-export-v2 | afe5ff8ab6f98373 | self.contents = tk.StringVar() # Set it to some value. self.contents.set("this is a variable") # Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents
# Define a callback for when the user hits return. # It prints the current value of the variable. self.entrythingy.bind('<Key-Re... | trusted_official_docs | CPython Docs | self.contents = tk.StringVar() # Set it to some value. self.contents.set("this is a variable") # Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents
# Define a callback for when the user hits return. # It prints the current value of the variable. self.entrythingy.bind('<Key-Re... | self.contents = tk.StringVar() # Set it to some value. self.contents.set("this is a variable") # Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents
# Define a callback for when the user hits return. # It prints the current value of the variable. self.entrythingy.bind('<Key-Re... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7b0a32d-29c1-43bd-8865-535763bfccbd | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,531 | supabase-export-v2 | 7793eea6af87a539 | relief Determines what the border style of a widget will be. Legal values are: ``"raised"``, ``"sunken"``, ``"flat"``, ``"groove"``, and ``"ridge"``.
scrollcommand
This is almost always the :meth:`!set` method of some scrollbar widget, but can
be any widget method that takes a single argument. | trusted_official_docs | CPython Docs | relief Determines what the border style of a widget will be. Legal values are: ``"raised"``, ``"sunken"``, ``"flat"``, ``"groove"``, and ``"ridge"``.
scrollcommand
This is almost always the :meth:`!set` method of some scrollbar widget, but can
be any widget method that takes a single argument. | relief Determines what the border style of a widget will be. Legal values are: ``"raised"``, ``"sunken"``, ``"flat"``, ``"groove"``, and ``"ridge"``.
scrollcommand
This is almost always the :meth:`!set` method of some scrollbar widget, but can
be any widget method that takes a single argument. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7fd1118-973f-4256-987f-76e01d176824 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,336 | supabase-export-v2 | 670c165136a30682 | Python interface to the Tcl/Tk GUI toolkit. Both Tk and :mod:`!tkinter` are available on most Unix platforms, including macOS, as well as on Windows systems.
Running ``python -m tkinter`` from the command line should open a window
demonstrating a simple Tk interface, letting you know that :mod:`!tkinter` is
properly in... | trusted_official_docs | CPython Docs | Python interface to the Tcl/Tk GUI toolkit. Both Tk and :mod:`!tkinter` are available on most Unix platforms, including macOS, as well as on Windows systems.
Running ``python -m tkinter`` from the command line should open a window
demonstrating a simple Tk interface, letting you know that :mod:`!tkinter` is
properly in... | Python interface to the Tcl/Tk GUI toolkit. Both Tk and :mod:`!tkinter` are available on most Unix platforms, including macOS, as well as on Windows systems.
Running ``python -m tkinter`` from the command line should open a window
demonstrating a simple Tk interface, letting you know that :mod:`!tkinter` is
properly in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a914b2d6-e05d-4308-bc82-9e747829f41c | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,423 | supabase-export-v2 | 89db4ab28e3284d3 | * Tcl widget options (like ``-text``) correspond to keyword arguments in Tkinter.
* Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``),
whereas Tkinter doesn't use names but object references. | trusted_official_docs | CPython Docs | * Tcl widget options (like ``-text``) correspond to keyword arguments in Tkinter.
* Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``),
whereas Tkinter doesn't use names but object references. | * Tcl widget options (like ``-text``) correspond to keyword arguments in Tkinter.
* Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``),
whereas Tkinter doesn't use names but object references. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ab34d9d3-2afe-4fc3-ad5f-14988afe5cf5 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,376 | supabase-export-v2 | 89b82e4fd38acb80 | The immediate descendants of this widget as a :class:`dict` with the child widget names as the keys and the child instance objects as the values.
.. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False) | trusted_official_docs | CPython Docs | The immediate descendants of this widget as a :class:`dict` with the child widget names as the keys and the child instance objects as the values.
.. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False) | The immediate descendants of this widget as a :class:`dict` with the child widget names as the keys and the child instance objects as the values.
.. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
acef5599-63c8-4e16-b806-731f213087f9 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,359 | supabase-export-v2 | 82222da98a0d6c5e | Internally, Tk and Ttk use facilities of the underlying operating system, i.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows.
When your Python application uses a class in Tkinter, e.g., to create a widget,
the :mod:`!tkinter` module first assembles a Tcl/Tk command string. It passes that
Tcl command string to an in... | trusted_official_docs | CPython Docs | Internally, Tk and Ttk use facilities of the underlying operating system, i.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows.
When your Python application uses a class in Tkinter, e.g., to create a widget,
the :mod:`!tkinter` module first assembles a Tcl/Tk command string. It passes that
Tcl command string to an in... | Internally, Tk and Ttk use facilities of the underlying operating system, i.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows.
When your Python application uses a class in Tkinter, e.g., to create a widget,
the :mod:`!tkinter` module first assembles a Tcl/Tk command string. It passes that
Tcl command string to an in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ae302efb-21ae-440d-bca7-1622300031db | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,415 | supabase-export-v2 | f0b7423495a797be | Understanding How Tkinter Wraps Tcl/Tk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When your application uses Tkinter's classes and methods, internally Tkinter
is assembling strings representing Tcl/Tk commands, and executing those
commands in the Tcl interpreter attached to your application's :class:`Tk`
instance. | trusted_official_docs | CPython Docs | Understanding How Tkinter Wraps Tcl/Tk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When your application uses Tkinter's classes and methods, internally Tkinter
is assembling strings representing Tcl/Tk commands, and executing those
commands in the Tcl interpreter attached to your application's :class:`Tk`
instance. | Understanding How Tkinter Wraps Tcl/Tk ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When your application uses Tkinter's classes and methods, internally Tkinter
is assembling strings representing Tcl/Tk commands, and executing those
commands in the Tcl interpreter attached to your application's :class:`Tk`
instance. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b156536b-dd51-4874-bc16-aa74ce2ded48 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,496 | supabase-export-v2 | c7b47ae92f4d4867 | Coupling Widget Variables ^^^^^^^^^^^^^^^^^^^^^^^^^
The current-value setting of some widgets (like text entry widgets) can be
connected directly to application variables by using special options. These
options are ``variable``, ``textvariable``, ``onvalue``, ``offvalue``, and
``value``. This connection works both ways... | trusted_official_docs | CPython Docs | Coupling Widget Variables ^^^^^^^^^^^^^^^^^^^^^^^^^
The current-value setting of some widgets (like text entry widgets) can be
connected directly to application variables by using special options. These
options are ``variable``, ``textvariable``, ``onvalue``, ``offvalue``, and
``value``. This connection works both ways... | Coupling Widget Variables ^^^^^^^^^^^^^^^^^^^^^^^^^
The current-value setting of some widgets (like text entry widgets) can be
connected directly to application variables by using special options. These
options are ``variable``, ``textvariable``, ``onvalue``, ``offvalue``, and
``value``. This connection works both ways... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b245bdad-205a-4535-beff-c0672ee289a3 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,454 | supabase-export-v2 | 6032752b25940da8 | created the :class:`Tk` object, an event is posted to the interpreter's event queue, and when executed, the result is returned to the calling Python thread.
Tcl/Tk applications are normally event-driven, meaning that after initialization,
the interpreter runs an event loop (i.e. :func:`Tk.mainloop`) and responds to eve... | trusted_official_docs | CPython Docs | created the :class:`Tk` object, an event is posted to the interpreter's event queue, and when executed, the result is returned to the calling Python thread.
Tcl/Tk applications are normally event-driven, meaning that after initialization,
the interpreter runs an event loop (i.e. :func:`Tk.mainloop`) and responds to eve... | created the :class:`Tk` object, an event is posted to the interpreter's event queue, and when executed, the result is returned to the calling Python thread.
Tcl/Tk applications are normally event-driven, meaning that after initialization,
the interpreter runs an event loop (i.e. :func:`Tk.mainloop`) and responds to eve... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b24ee2fb-785e-46d2-b6d0-619c56456b01 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,520 | supabase-export-v2 | 5e16b63f38a5158e | ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``, ``'warning'``. To specify an X bitmap filename, give the full path to the file, preceded with an ``@``, as in ``"@/usr/contrib/bitmap/gumby.bit"``.
boolean
You can pass integers 0 or 1 or the strings ``"yes"`` or ``"no"``. | trusted_official_docs | CPython Docs | ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``, ``'warning'``. To specify an X bitmap filename, give the full path to the file, preceded with an ``@``, as in ``"@/usr/contrib/bitmap/gumby.bit"``.
boolean
You can pass integers 0 or 1 or the strings ``"yes"`` or ``"no"``. | ``'hourglass'``, ``'info'``, ``'questhead'``, ``'question'``, ``'warning'``. To specify an X bitmap filename, give the full path to the file, preceded with an ``@``, as in ``"@/usr/contrib/bitmap/gumby.bit"``.
boolean
You can pass integers 0 or 1 or the strings ``"yes"`` or ``"no"``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b339ab3a-74d0-4859-9ecf-eff2d9d40169 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,510 | supabase-export-v2 | a2c00b8957bb0b8c | This method begins with an underscore to denote the fact that this function is part of the implementation, and not an interface to Tk functionality.
Here are some examples of typical usage:: | trusted_official_docs | CPython Docs | This method begins with an underscore to denote the fact that this function is part of the implementation, and not an interface to Tk functionality.
Here are some examples of typical usage:: | This method begins with an underscore to denote the fact that this function is part of the implementation, and not an interface to Tk functionality.
Here are some examples of typical usage:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b592e626-9ce0-4a88-8d00-24c589418d9d | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,411 | supabase-export-v2 | d817506e9f3653fb | turn was contained within the root window. When creating each *child* widget, its *parent* widget is passed as the first argument to the widget constructor.
configuration options
Widgets have *configuration options*, which modify their appearance and
behavior, such as the text to display in a label or button. Differe... | trusted_official_docs | CPython Docs | turn was contained within the root window. When creating each *child* widget, its *parent* widget is passed as the first argument to the widget constructor.
configuration options
Widgets have *configuration options*, which modify their appearance and
behavior, such as the text to display in a label or button. Differe... | turn was contained within the root window. When creating each *child* widget, its *parent* widget is passed as the first argument to the widget constructor.
configuration options
Widgets have *configuration options*, which modify their appearance and
behavior, such as the text to display in a label or button. Differe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b5d0d684-dfda-47ba-bfde-2ae45f16a71c | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,352 | supabase-export-v2 | c3c2f80d4d7f5586 | * `Programming Python <https://learning-python.com/about-pp4e.html>`_ By Mark Lutz; has excellent coverage of Tkinter. (ISBN 978-0596158101)
* `Tcl and the Tk Toolkit (2nd edition) <https://www.amazon.com/exec/obidos/ASIN/032133633X>`_
By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover Tkinter. (ISB... | trusted_official_docs | CPython Docs | * `Programming Python <https://learning-python.com/about-pp4e.html>`_ By Mark Lutz; has excellent coverage of Tkinter. (ISBN 978-0596158101)
* `Tcl and the Tk Toolkit (2nd edition) <https://www.amazon.com/exec/obidos/ASIN/032133633X>`_
By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover Tkinter. (ISB... | * `Programming Python <https://learning-python.com/about-pp4e.html>`_ By Mark Lutz; has excellent coverage of Tkinter. (ISBN 978-0596158101)
* `Tcl and the Tk Toolkit (2nd edition) <https://www.amazon.com/exec/obidos/ASIN/032133633X>`_
By John Ousterhout, inventor of Tcl/Tk, and Ken Jones; does not cover Tkinter. (ISB... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b668bcbb-12bd-442d-8cf1-c519a6d68127 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,561 | supabase-export-v2 | d8876946e0b07a6a | * :class:`PhotoImage` for images in PGM, PPM, GIF and PNG formats. The latter is supported starting with Tk 8.6.
Either type of image is created through either the ``file`` or the ``data``
option (other options are available as well). | trusted_official_docs | CPython Docs | * :class:`PhotoImage` for images in PGM, PPM, GIF and PNG formats. The latter is supported starting with Tk 8.6.
Either type of image is created through either the ``file`` or the ``data``
option (other options are available as well). | * :class:`PhotoImage` for images in PGM, PPM, GIF and PNG formats. The latter is supported starting with Tk 8.6.
Either type of image is created through either the ``file`` or the ``data``
option (other options are available as well). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c8dfd02a-86db-4910-8ecb-f32cdded03a9 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,532 | supabase-export-v2 | cd97d5c1e8ce4ff4 | scrollcommand This is almost always the :meth:`!set` method of some scrollbar widget, but can be any widget method that takes a single argument.
wrap
Must be one of: ``"none"``, ``"char"``, or ``"word"``. | trusted_official_docs | CPython Docs | scrollcommand This is almost always the :meth:`!set` method of some scrollbar widget, but can be any widget method that takes a single argument.
wrap
Must be one of: ``"none"``, ``"char"``, or ``"word"``. | scrollcommand This is almost always the :meth:`!set` method of some scrollbar widget, but can be any widget method that takes a single argument.
wrap
Must be one of: ``"none"``, ``"char"``, or ``"word"``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf0bf1b7-a1d0-4109-802a-c7b8115a6116 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,405 | supabase-export-v2 | b94157e8d2ecf1a0 | :meth:`grid` method is used to specify the relative layout (position) of the label within its containing frame widget, similar to how tables in HTML work.
A button widget is then created, and placed to the right of the label. When
pressed, it will call the :meth:`destroy` method of the root window. | trusted_official_docs | CPython Docs | :meth:`grid` method is used to specify the relative layout (position) of the label within its containing frame widget, similar to how tables in HTML work.
A button widget is then created, and placed to the right of the label. When
pressed, it will call the :meth:`destroy` method of the root window. | :meth:`grid` method is used to specify the relative layout (position) of the label within its containing frame widget, similar to how tables in HTML work.
A button widget is then created, and placed to the right of the label. When
pressed, it will call the :meth:`destroy` method of the root window. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf254ab6-32c0-4ad7-a967-45b9f43e71f4 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,475 | supabase-export-v2 | 10398bbfba3ed385 | of these calls is a dictionary whose key is the name of the option as a string (for example, ``'relief'``) and whose values are 5-tuples.
Some options, like ``bg`` are synonyms for common options with long names
(``bg`` is shorthand for "background"). Passing the ``config()`` method the name
of a shorthand option will ... | trusted_official_docs | CPython Docs | of these calls is a dictionary whose key is the name of the option as a string (for example, ``'relief'``) and whose values are 5-tuples.
Some options, like ``bg`` are synonyms for common options with long names
(``bg`` is shorthand for "background"). Passing the ``config()`` method the name
of a shorthand option will ... | of these calls is a dictionary whose key is the name of the option as a string (for example, ``'relief'``) and whose values are 5-tuples.
Some options, like ``bg`` are synonyms for common options with long names
(``bg`` is shorthand for "background"). Passing the ``config()`` method the name
of a shorthand option will ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cf7163b5-e240-4c78-a1ff-790d273c7baf | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,572 | supabase-export-v2 | eba62ed4a3fe42f0 | reading a predefined number of bytes. For sockets, the :meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will work fine; for other files, use raw reads or ``os.read(file.fileno(), maxbytecount)``.
.. method:: Widget.tk.createfilehandler(file, mask, func) | trusted_official_docs | CPython Docs | reading a predefined number of bytes. For sockets, the :meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will work fine; for other files, use raw reads or ``os.read(file.fileno(), maxbytecount)``.
.. method:: Widget.tk.createfilehandler(file, mask, func) | reading a predefined number of bytes. For sockets, the :meth:`~socket.socket.recv` or :meth:`~socket.socket.recvfrom` methods will work fine; for other files, use raw reads or ``os.read(file.fileno(), maxbytecount)``.
.. method:: Widget.tk.createfilehandler(file, mask, func) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d16a4bc4-1ade-4083-b50e-6d5a8ce3103e | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,486 | supabase-export-v2 | 2686c68b8a5b6d16 | the widget is to appear within its container, and how it is to behave when the main application window is resized. Here are some examples::
fred.pack() # defaults to side = "top"
fred.pack(side="left")
fred.pack(expand=1) | trusted_official_docs | CPython Docs | the widget is to appear within its container, and how it is to behave when the main application window is resized. Here are some examples::
fred.pack() # defaults to side = "top"
fred.pack(side="left")
fred.pack(expand=1) | the widget is to appear within its container, and how it is to behave when the main application window is resized. Here are some examples::
fred.pack() # defaults to side = "top"
fred.pack(side="left")
fred.pack(expand=1) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d48b118f-3a5f-4cc0-9e8b-cdd94d8aa06a | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,489 | supabase-export-v2 | 505d2d7e6987d35e | For more extensive information on the packer and the options that it can take, see the man pages and page 183 of John Ousterhout's book.
anchor
Anchor type. Denotes where the packer is to place each content in its parcel. | trusted_official_docs | CPython Docs | For more extensive information on the packer and the options that it can take, see the man pages and page 183 of John Ousterhout's book.
anchor
Anchor type. Denotes where the packer is to place each content in its parcel. | For more extensive information on the packer and the options that it can take, see the man pages and page 183 of John Ousterhout's book.
anchor
Anchor type. Denotes where the packer is to place each content in its parcel. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d573055d-b5e9-43aa-b039-4477c9e6bc9c | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,458 | supabase-export-v2 | 3662c847f3ded81a | thread, even if this is different than the thread that created the Tcl interpreter. A global lock ensures only one call occurs at a time.
* While :mod:`!tkinter` allows you to create more than one instance of a :class:`Tk`
object (with its own interpreter), all interpreters that are part of the same
thread share a co... | trusted_official_docs | CPython Docs | thread, even if this is different than the thread that created the Tcl interpreter. A global lock ensures only one call occurs at a time.
* While :mod:`!tkinter` allows you to create more than one instance of a :class:`Tk`
object (with its own interpreter), all interpreters that are part of the same
thread share a co... | thread, even if this is different than the thread that created the Tcl interpreter. A global lock ensures only one call occurs at a time.
* While :mod:`!tkinter` allows you to create more than one instance of a :class:`Tk`
object (with its own interpreter), all interpreters that are part of the same
thread share a co... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d6b8381f-5f40-4ccd-befa-16636b2c3383 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,355 | supabase-export-v2 | ce9aa6c9555c8f6a | of a few distinct modules, each with separate functionality and its own official documentation. Python's binary releases also ship an add-on module together with it.
Tcl
Tcl is a dynamic interpreted programming language, just like Python. Though
it can be used on its own as a general-purpose programming language, it ... | trusted_official_docs | CPython Docs | of a few distinct modules, each with separate functionality and its own official documentation. Python's binary releases also ship an add-on module together with it.
Tcl
Tcl is a dynamic interpreted programming language, just like Python. Though
it can be used on its own as a general-purpose programming language, it ... | of a few distinct modules, each with separate functionality and its own official documentation. Python's binary releases also ship an add-on module together with it.
Tcl
Tcl is a dynamic interpreted programming language, just like Python. Though
it can be used on its own as a general-purpose programming language, it ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d838a070-aee0-49ce-a9aa-0faf405df692 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,406 | supabase-export-v2 | 8ec274564cf300d3 | button widget is then created, and placed to the right of the label. When pressed, it will call the :meth:`destroy` method of the root window.
Finally, the :meth:`mainloop` method puts everything on the display, and
responds to user input until the program terminates. | trusted_official_docs | CPython Docs | button widget is then created, and placed to the right of the label. When pressed, it will call the :meth:`destroy` method of the root window.
Finally, the :meth:`mainloop` method puts everything on the display, and
responds to user input until the program terminates. | button widget is then created, and placed to the right of the label. When pressed, it will call the :meth:`destroy` method of the root window.
Finally, the :meth:`mainloop` method puts everything on the display, and
responds to user input until the program terminates. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d8c9c84f-909e-4021-b062-05f9013d88ea | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,476 | supabase-export-v2 | b015ce53fa85d725 | will return a 2-tuple, not 5-tuple. The 2-tuple passed back will contain the name of the synonym and the "real" option (such as ``('bg', 'background')``).
+-------+---------------------------------+--------------+
| Index | Meaning | Example |
+=======+=================================+==============+
| 0 | option name... | trusted_official_docs | CPython Docs | will return a 2-tuple, not 5-tuple. The 2-tuple passed back will contain the name of the synonym and the "real" option (such as ``('bg', 'background')``).
+-------+---------------------------------+--------------+
| Index | Meaning | Example |
+=======+=================================+==============+
| 0 | option name... | will return a 2-tuple, not 5-tuple. The 2-tuple passed back will contain the name of the synonym and the "real" option (such as ``('bg', 'background')``).
+-------+---------------------------------+--------------+
| Index | Meaning | Example |
+=======+=================================+==============+
| 0 | option name... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
db93d0ae-f8a0-4866-af3d-c83075393209 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,460 | supabase-export-v2 | 9cd7be08ce629023 | event loops or abandon the event loop entirely. If you're doing anything tricky when it comes to events or threads, be aware of these possibilities.
* There are a few select :mod:`!tkinter` functions that presently work only when
called from the thread that created the Tcl interpreter. | trusted_official_docs | CPython Docs | event loops or abandon the event loop entirely. If you're doing anything tricky when it comes to events or threads, be aware of these possibilities.
* There are a few select :mod:`!tkinter` functions that presently work only when
called from the thread that created the Tcl interpreter. | event loops or abandon the event loop entirely. If you're doing anything tricky when it comes to events or threads, be aware of these possibilities.
* There are a few select :mod:`!tkinter` functions that presently work only when
called from the thread that created the Tcl interpreter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dbb5760b-7356-4d92-adf7-9c04bb35d778 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,550 | supabase-export-v2 | 15baf56f361dbc87 | Text widget indexes The index notation for Text widgets is very rich and is best described in the Tk man pages.
Menu indexes (menu.invoke(), menu.entryconfig(), etc.)
Some options and methods for menus manipulate specific menu entries. Anytime a
menu index is needed for an option or a parameter, you may pass in: | trusted_official_docs | CPython Docs | Text widget indexes The index notation for Text widgets is very rich and is best described in the Tk man pages.
Menu indexes (menu.invoke(), menu.entryconfig(), etc.)
Some options and methods for menus manipulate specific menu entries. Anytime a
menu index is needed for an option or a parameter, you may pass in: | Text widget indexes The index notation for Text widgets is very rich and is best described in the Tk man pages.
Menu indexes (menu.invoke(), menu.entryconfig(), etc.)
Some options and methods for menus manipulate specific menu entries. Anytime a
menu index is needed for an option or a parameter, you may pass in: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
de0a662e-20a5-4169-b15d-9c87a59e71c5 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,482 | supabase-export-v2 | c5126a5c9d43842a | .. index:: single: packing (widgets)
The packer is one of Tk's geometry-management mechanisms. Geometry managers
are used to specify the relative positioning of widgets within their container. In contrast to the more cumbersome *placer* (which is
used less commonly, and we do not cover here), the packer takes qualitati... | trusted_official_docs | CPython Docs | .. index:: single: packing (widgets)
The packer is one of Tk's geometry-management mechanisms. Geometry managers
are used to specify the relative positioning of widgets within their container. In contrast to the more cumbersome *placer* (which is
used less commonly, and we do not cover here), the packer takes qualitati... | .. index:: single: packing (widgets)
The packer is one of Tk's geometry-management mechanisms. Geometry managers
are used to specify the relative positioning of widgets within their container. In contrast to the more cumbersome *placer* (which is
used less commonly, and we do not cover here), the packer takes qualitati... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e0de76ad-aa8a-4a17-8141-59b921ebb750 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,362 | supabase-export-v2 | b7aaa52f9c8e3f12 | several modules. Most applications will need the main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides the modern themed widget set and API::
from tkinter import *
from tkinter import ttk | trusted_official_docs | CPython Docs | several modules. Most applications will need the main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides the modern themed widget set and API::
from tkinter import *
from tkinter import ttk | several modules. Most applications will need the main :mod:`!tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides the modern themed widget set and API::
from tkinter import *
from tkinter import ttk | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e4378ee7-4f77-423e-a9cf-e22d759ccf58 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,416 | supabase-export-v2 | 074331c8ee211dd6 | classes and methods, internally Tkinter is assembling strings representing Tcl/Tk commands, and executing those commands in the Tcl interpreter attached to your application's :class:`Tk` instance.
Whether it's trying to navigate reference documentation, trying to find
the right method or option, adapting some existing ... | trusted_official_docs | CPython Docs | classes and methods, internally Tkinter is assembling strings representing Tcl/Tk commands, and executing those commands in the Tcl interpreter attached to your application's :class:`Tk` instance.
Whether it's trying to navigate reference documentation, trying to find
the right method or option, adapting some existing ... | classes and methods, internally Tkinter is assembling strings representing Tcl/Tk commands, and executing those commands in the Tcl interpreter attached to your application's :class:`Tk` instance.
Whether it's trying to navigate reference documentation, trying to find
the right method or option, adapting some existing ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e49affc0-5dec-4bef-a6b4-fbb8ee9f6683 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,433 | supabase-export-v2 | 498933430bccc8bc | btn = ttk.Button(frm, ...) print(btn.configure().keys())
As most widgets have many configuration options in common, it can be useful
to find out which are specific to a particular widget class. Comparing the
list of options to that of a simpler widget, like a frame, is one way to
do that. | trusted_official_docs | CPython Docs | btn = ttk.Button(frm, ...) print(btn.configure().keys())
As most widgets have many configuration options in common, it can be useful
to find out which are specific to a particular widget class. Comparing the
list of options to that of a simpler widget, like a frame, is one way to
do that. | btn = ttk.Button(frm, ...) print(btn.configure().keys())
As most widgets have many configuration options in common, it can be useful
to find out which are specific to a particular widget class. Comparing the
list of options to that of a simpler widget, like a frame, is one way to
do that. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ecb705bf-f1ea-4ef5-bcd6-7614754b51f7 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,502 | supabase-export-v2 | 267fddccd11d25e1 | self.entrythingy = tk.Entry() self.entrythingy.pack()
# Create the application variable. self.contents = tk.StringVar()
# Set it to some value. self.contents.set("this is a variable")
# Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents | trusted_official_docs | CPython Docs | self.entrythingy = tk.Entry() self.entrythingy.pack()
# Create the application variable. self.contents = tk.StringVar()
# Set it to some value. self.contents.set("this is a variable")
# Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents | self.entrythingy = tk.Entry() self.entrythingy.pack()
# Create the application variable. self.contents = tk.StringVar()
# Set it to some value. self.contents.set("this is a variable")
# Tell the entry widget to watch this variable. self.entrythingy["textvariable"] = self.contents | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ed6f0438-83f5-4a99-8826-8c3ba1fc4a7e | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,424 | supabase-export-v2 | 7fce1e2caa53c129 | * Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``), whereas Tkinter doesn't use names but object references.
* A widget's place in the widget hierarchy is encoded in its (hierarchical)
pathname, which uses a ``.`` (dot) as a path separator. The pathname for
the root window is just ``.`` (dot). In Tk... | trusted_official_docs | CPython Docs | * Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``), whereas Tkinter doesn't use names but object references.
* A widget's place in the widget hierarchy is encoded in its (hierarchical)
pathname, which uses a ``.`` (dot) as a path separator. The pathname for
the root window is just ``.`` (dot). In Tk... | * Widgets are referred to by a *pathname* in Tcl (like ``.frm.btn``), whereas Tkinter doesn't use names but object references.
* A widget's place in the widget hierarchy is encoded in its (hierarchical)
pathname, which uses a ``.`` (dot) as a path separator. The pathname for
the root window is just ``.`` (dot). In Tk... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f1fdb749-81a0-4093-8c94-dc56850f7d81 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,364 | supabase-export-v2 | 24a3629e7644cf72 | .. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=True, sync=False, use=None)
Construct a toplevel Tk widget, which is usually the main window of an
application, and initialize a Tcl interpreter for this widget. Each
instance has its own associated Tcl interpreter. | trusted_official_docs | CPython Docs | .. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=True, sync=False, use=None)
Construct a toplevel Tk widget, which is usually the main window of an
application, and initialize a Tcl interpreter for this widget. Each
instance has its own associated Tcl interpreter. | .. class:: Tk(screenName=None, baseName=None, className='Tk', useTk=True, sync=False, use=None)
Construct a toplevel Tk widget, which is usually the main window of an
application, and initialize a Tcl interpreter for this widget. Each
instance has its own associated Tcl interpreter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f3289f7a-de42-4fbd-8fe7-d1787cd668e2 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,358 | supabase-export-v2 | 6571cfb157d80354 | the classic Tk widgets. Ttk is distributed as part of Tk, starting with Tk version 8.5. Python bindings are provided in a separate module, :mod:`tkinter.ttk`.
Internally, Tk and Ttk use facilities of the underlying operating system,
i.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows. | trusted_official_docs | CPython Docs | the classic Tk widgets. Ttk is distributed as part of Tk, starting with Tk version 8.5. Python bindings are provided in a separate module, :mod:`tkinter.ttk`.
Internally, Tk and Ttk use facilities of the underlying operating system,
i.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows. | the classic Tk widgets. Ttk is distributed as part of Tk, starting with Tk version 8.5. Python bindings are provided in a separate module, :mod:`tkinter.ttk`.
Internally, Tk and Ttk use facilities of the underlying operating system,
i.e., Xlib on Unix/X11, Cocoa on macOS, GDI on Windows. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f56769d2-9c2c-44f2-a2b5-a4011568a99e | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,421 | supabase-export-v2 | 2fe2e8a00e191d1f | is the command to be executed, with arguments to that command following it, separated by spaces. Without getting into too many details, notice the following:
* The commands used to create widgets (like ``ttk::frame``) correspond to
widget classes in Tkinter. | trusted_official_docs | CPython Docs | is the command to be executed, with arguments to that command following it, separated by spaces. Without getting into too many details, notice the following:
* The commands used to create widgets (like ``ttk::frame``) correspond to
widget classes in Tkinter. | is the command to be executed, with arguments to that command following it, separated by spaces. Without getting into too many details, notice the following:
* The commands used to create widgets (like ``ttk::frame``) correspond to
widget classes in Tkinter. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f5af4f23-a4f0-44d0-b1e2-e91b2a4c93a7 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,403 | supabase-export-v2 | db0c0c0152883276 | creates its associated Tcl interpreter. It also creates a toplevel window, known as the root window, which serves as the main window of the application.
The following line creates a frame widget, which in this case will contain
a label and a button we'll create next. The frame is fit inside the root
window. | trusted_official_docs | CPython Docs | creates its associated Tcl interpreter. It also creates a toplevel window, known as the root window, which serves as the main window of the application.
The following line creates a frame widget, which in this case will contain
a label and a button we'll create next. The frame is fit inside the root
window. | creates its associated Tcl interpreter. It also creates a toplevel window, known as the root window, which serves as the main window of the application.
The following line creates a frame widget, which in this case will contain
a label and a button we'll create next. The frame is fit inside the root
window. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f6a5727e-73b1-40e5-9969-f6cdf02b4665 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,563 | supabase-export-v2 | 60df6dbf607118a2 | possibly with pixel zooming and/or subsampling. Add *from_coords* parameter to :class:`!PhotoImage` methods :meth:`!copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* and *subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`.
The image object can then be used wherever an ``image`` option is supported... | trusted_official_docs | CPython Docs | possibly with pixel zooming and/or subsampling. Add *from_coords* parameter to :class:`!PhotoImage` methods :meth:`!copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* and *subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`.
The image object can then be used wherever an ``image`` option is supported... | possibly with pixel zooming and/or subsampling. Add *from_coords* parameter to :class:`!PhotoImage` methods :meth:`!copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* and *subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`.
The image object can then be used wherever an ``image`` option is supported... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f91c033b-002a-4bb4-a7dd-45c8c95457a4 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,484 | supabase-export-v2 | d7bb6ee0b00845d5 | to achieve the kind of layout you desire. Additionally, the arrangement is dynamically adjusted to accommodate incremental changes to the configuration, once it is packed.
Note that widgets do not appear until they have had their geometry specified
with a geometry manager. It's a common early mistake to leave out the g... | trusted_official_docs | CPython Docs | to achieve the kind of layout you desire. Additionally, the arrangement is dynamically adjusted to accommodate incremental changes to the configuration, once it is packed.
Note that widgets do not appear until they have had their geometry specified
with a geometry manager. It's a common early mistake to leave out the g... | to achieve the kind of layout you desire. Additionally, the arrangement is dynamically adjusted to accommodate incremental changes to the configuration, once it is packed.
Note that widgets do not appear until they have had their geometry specified
with a geometry manager. It's a common early mistake to leave out the g... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f990a7cd-75c8-43c2-98ec-5b304c892ecd | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,344 | supabase-export-v2 | 36959f29e1c9b3de | * `TkDocs <https://tkdocs.com/>`_ Extensive tutorial on creating user interfaces with Tkinter. Explains key concepts, and illustrates recommended approaches using the modern API.
* `Tkinter 8.5 reference: a GUI for Python <https://www.tkdocs.com/shipman/>`_
Reference documentation for Tkinter 8.5 detailing available c... | trusted_official_docs | CPython Docs | * `TkDocs <https://tkdocs.com/>`_ Extensive tutorial on creating user interfaces with Tkinter. Explains key concepts, and illustrates recommended approaches using the modern API.
* `Tkinter 8.5 reference: a GUI for Python <https://www.tkdocs.com/shipman/>`_
Reference documentation for Tkinter 8.5 detailing available c... | * `TkDocs <https://tkdocs.com/>`_ Extensive tutorial on creating user interfaces with Tkinter. Explains key concepts, and illustrates recommended approaches using the modern API.
* `Tkinter 8.5 reference: a GUI for Python <https://www.tkdocs.com/shipman/>`_
Reference documentation for Tkinter 8.5 detailing available c... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fb3b37d6-2a36-4353-a982-8415dcd08be8 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,377 | supabase-export-v2 | 653d0ac8febd0db9 | .. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False)
The :func:`Tcl` function is a factory function which creates an object much like
that created by the :class:`Tk` class, except that it does not initialize the Tk
subsystem. This is most often useful when driving the Tcl interpreter in an
... | trusted_official_docs | CPython Docs | .. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False)
The :func:`Tcl` function is a factory function which creates an object much like
that created by the :class:`Tk` class, except that it does not initialize the Tk
subsystem. This is most often useful when driving the Tcl interpreter in an
... | .. function:: Tcl(screenName=None, baseName=None, className='Tk', useTk=False)
The :func:`Tcl` function is a factory function which creates an object much like
that created by the :class:`Tk` class, except that it does not initialize the Tk
subsystem. This is most often useful when driving the Tcl interpreter in an
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fd17ddca-66ee-4f1e-99bf-6aaa1852a214 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,459 | supabase-export-v2 | 27adc607e0206256 | than one instance of :class:`Tk` at a time. Otherwise, it's best to create them in separate threads and ensure you're running a thread-aware Tcl/Tk build.
* Blocking event handlers are not the only way to prevent the Tcl interpreter from
reentering the event loop. It is even possible to run multiple nested event loops... | trusted_official_docs | CPython Docs | than one instance of :class:`Tk` at a time. Otherwise, it's best to create them in separate threads and ensure you're running a thread-aware Tcl/Tk build.
* Blocking event handlers are not the only way to prevent the Tcl interpreter from
reentering the event loop. It is even possible to run multiple nested event loops... | than one instance of :class:`Tk` at a time. Otherwise, it's best to create them in separate threads and ensure you're running a thread-aware Tcl/Tk build.
* Blocking event handlers are not the only way to prevent the Tcl interpreter from
reentering the event loop. It is even possible to run multiple nested event loops... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
febc62f3-e565-4228-81e3-98abd9e81e74 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,412 | supabase-export-v2 | dc830d08e71be288 | their appearance and behavior, such as the text to display in a label or button. Different classes of widgets will have different sets of options.
geometry management
Widgets aren't automatically added to the user interface when they are
created. A *geometry manager* like ``grid`` controls where in the
user interfac... | trusted_official_docs | CPython Docs | their appearance and behavior, such as the text to display in a label or button. Different classes of widgets will have different sets of options.
geometry management
Widgets aren't automatically added to the user interface when they are
created. A *geometry manager* like ``grid`` controls where in the
user interfac... | their appearance and behavior, such as the text to display in a label or button. Different classes of widgets will have different sets of options.
geometry management
Widgets aren't automatically added to the user interface when they are
created. A *geometry manager* like ``grid`` controls where in the
user interfac... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff47eb9b-4aec-4e6a-b6b7-f807fece1f14 | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,540 | supabase-export-v2 | 2fca1e22d5a445f6 | to be invoked when the event occurs. An Event instance will be passed as the argument. (Functions deployed this way are commonly known as *callbacks*.)
add
is optional, either ``''`` or ``'+'``. Passing an empty string denotes that
this binding is to replace any other bindings that this event is associated
with. Pas... | trusted_official_docs | CPython Docs | to be invoked when the event occurs. An Event instance will be passed as the argument. (Functions deployed this way are commonly known as *callbacks*.)
add
is optional, either ``''`` or ``'+'``. Passing an empty string denotes that
this binding is to replace any other bindings that this event is associated
with. Pas... | to be invoked when the event occurs. An Event instance will be passed as the argument. (Functions deployed this way are commonly known as *callbacks*.)
add
is optional, either ``''`` or ``'+'``. Passing an empty string denotes that
this binding is to replace any other bindings that this event is associated
with. Pas... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ff65c3c0-6c6a-4d81-ac82-2c92033870ec | CPython Docs | file://datasets/cpython/Doc/library/tkinter.rst | unknown | 08c95c6d-9a71-45f9-be98-7ce14cff5193 | 35,544 | supabase-export-v2 | d76ed91f87c0f27d | self.button.bind("<Enter>", self.turn_red)
Notice how the widget field of the event is being accessed in the
``turn_red()`` callback. This field contains the widget that caught the X
event. The following table lists the other event fields you can access, and how
they are denoted in Tk, which can be useful when referrin... | trusted_official_docs | CPython Docs | self.button.bind("<Enter>", self.turn_red)
Notice how the widget field of the event is being accessed in the
``turn_red()`` callback. This field contains the widget that caught the X
event. The following table lists the other event fields you can access, and how
they are denoted in Tk, which can be useful when referrin... | self.button.bind("<Enter>", self.turn_red)
Notice how the widget field of the event is being accessed in the
``turn_red()`` callback. This field contains the widget that caught the X
event. The following table lists the other event fields you can access, and how
they are denoted in Tk, which can be useful when referrin... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
01162e77-ba5f-4236-bb2a-4d768203377f | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,790 | supabase-export-v2 | 8c422f094dc1eb5f | this, and so a :exc:`KeyboardInterrupt` (or any other exception resulting from a signal handler) may on rare occasions put the program in an unexpected state.
To illustrate this issue, consider the following code:: | trusted_official_docs | CPython Docs | this, and so a :exc:`KeyboardInterrupt` (or any other exception resulting from a signal handler) may on rare occasions put the program in an unexpected state.
To illustrate this issue, consider the following code:: | this, and so a :exc:`KeyboardInterrupt` (or any other exception resulting from a signal handler) may on rare occasions put the program in an unexpected state.
To illustrate this issue, consider the following code:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0734cc95-2513-429f-8909-45b84b721579 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,711 | supabase-export-v2 | 6d9e2b634e707d91 | *mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask including all signals.
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
signal mask of the calling thread. | trusted_official_docs | CPython Docs | *mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask including all signals.
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
signal mask of the calling thread. | *mask* is a set of signal numbers (e.g. {:const:`signal.SIGINT`, :const:`signal.SIGTERM`}). Use :func:`~signal.valid_signals` for a full mask including all signals.
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
signal mask of the calling thread. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0b4757a1-5593-473f-a00f-91c09c18622a | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,795 | supabase-export-v2 | b10511a72dc45030 | a means of gracefully shutting down. Instead, they should install their own :const:`SIGINT` handler. Below is an example of an HTTP server that avoids :exc:`KeyboardInterrupt`::
import signal
import socket
from selectors import DefaultSelector, EVENT_READ
from http.server import HTTPServer, SimpleHTTPRequestHandler | trusted_official_docs | CPython Docs | a means of gracefully shutting down. Instead, they should install their own :const:`SIGINT` handler. Below is an example of an HTTP server that avoids :exc:`KeyboardInterrupt`::
import signal
import socket
from selectors import DefaultSelector, EVENT_READ
from http.server import HTTPServer, SimpleHTTPRequestHandler | a means of gracefully shutting down. Instead, they should install their own :const:`SIGINT` handler. Below is an example of an HTTP server that avoids :exc:`KeyboardInterrupt`::
import signal
import socket
from selectors import DefaultSelector, EVENT_READ
from http.server import HTTPServer, SimpleHTTPRequestHandler | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0c6def05-956e-4be2-90e1-df7cf894c541 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,792 | supabase-export-v2 | f36abf03860827e6 | class SpamContext: def __init__(self): self.lock = threading.Lock()
def __enter__(self):
# If KeyboardInterrupt occurs here, everything is fine
self.lock.acquire()
# If KeyboardInterrupt occurs here, __exit__ will not be called
... # KeyboardInterrupt could occur just before the function returns | trusted_official_docs | CPython Docs | class SpamContext: def __init__(self): self.lock = threading.Lock()
def __enter__(self):
# If KeyboardInterrupt occurs here, everything is fine
self.lock.acquire()
# If KeyboardInterrupt occurs here, __exit__ will not be called
... # KeyboardInterrupt could occur just before the function returns | class SpamContext: def __init__(self): self.lock = threading.Lock()
def __enter__(self):
# If KeyboardInterrupt occurs here, everything is fine
self.lock.acquire()
# If KeyboardInterrupt occurs here, __exit__ will not be called
... # KeyboardInterrupt could occur just before the function returns | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1638e1fd-0757-4bc3-a113-af17cb06c033 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,702 | supabase-export-v2 | a5f9c2adcbbc640d | 0, then no signal is sent, but error checking is still performed; this can be used to check if the target thread is still running.
.. audit-event:: signal.pthread_kill thread_id,signalnum signal.pthread_kill | trusted_official_docs | CPython Docs | 0, then no signal is sent, but error checking is still performed; this can be used to check if the target thread is still running.
.. audit-event:: signal.pthread_kill thread_id,signalnum signal.pthread_kill | 0, then no signal is sent, but error checking is still performed; this can be used to check if the target thread is still running.
.. audit-event:: signal.pthread_kill thread_id,signalnum signal.pthread_kill | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f3d7a2c-cd2b-41ce-85c1-65b7a69ef993 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,772 | supabase-export-v2 | 1396eea66cfd424d | .. versionadded:: 3.3
.. versionchanged:: 3.5
The function is now retried with the recomputed *timeout* if interrupted
by a signal not in *sigset* and the signal handler does not raise an
exception (see :pep:`475` for the rationale). | trusted_official_docs | CPython Docs | .. versionadded:: 3.3
.. versionchanged:: 3.5
The function is now retried with the recomputed *timeout* if interrupted
by a signal not in *sigset* and the signal handler does not raise an
exception (see :pep:`475` for the rationale). | .. versionadded:: 3.3
.. versionchanged:: 3.5
The function is now retried with the recomputed *timeout* if interrupted
by a signal not in *sigset* and the signal handler does not raise an
exception (see :pep:`475` for the rationale). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1fb887f9-3e3d-4e20-b15a-60ff6f056e69 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,709 | supabase-export-v2 | 19ea46b71763c6e5 | The behavior of the call is dependent on the value of *how*, as follows.
* :data:`SIG_BLOCK`: The set of blocked signals is the union of the current
set and the *mask* argument. * :data:`SIG_UNBLOCK`: The signals in *mask* are removed from the current
set of blocked signals. It is permissible to attempt to unblock a
... | trusted_official_docs | CPython Docs | The behavior of the call is dependent on the value of *how*, as follows.
* :data:`SIG_BLOCK`: The set of blocked signals is the union of the current
set and the *mask* argument. * :data:`SIG_UNBLOCK`: The signals in *mask* are removed from the current
set of blocked signals. It is permissible to attempt to unblock a
... | The behavior of the call is dependent on the value of *how*, as follows.
* :data:`SIG_BLOCK`: The set of blocked signals is the union of the current
set and the *mask* argument. * :data:`SIG_UNBLOCK`: The signals in *mask* are removed from the current
set of blocked signals. It is permissible to attempt to unblock a
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
20994499-d6f1-443c-bcdf-48385b37114b | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,672 | supabase-export-v2 | ab77a8fa347efe7b | .. exception:: ItimerError
Raised to signal an error from the underlying :func:`setitimer` or
:func:`getitimer` implementation. Expect this error if an invalid
interval timer or a negative time is passed to :func:`setitimer`. This error is a subtype of :exc:`OSError`. | trusted_official_docs | CPython Docs | .. exception:: ItimerError
Raised to signal an error from the underlying :func:`setitimer` or
:func:`getitimer` implementation. Expect this error if an invalid
interval timer or a negative time is passed to :func:`setitimer`. This error is a subtype of :exc:`OSError`. | .. exception:: ItimerError
Raised to signal an error from the underlying :func:`setitimer` or
:func:`getitimer` implementation. Expect this error if an invalid
interval timer or a negative time is passed to :func:`setitimer`. This error is a subtype of :exc:`OSError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2418f009-8125-4476-be1e-fe43d8b63c2a | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,789 | supabase-export-v2 | dd06a359f714e83e | Note on Signal Handlers and Exceptions --------------------------------------
If a signal handler raises an exception, the exception will be propagated to
the main thread and may be raised after any :term:`bytecode` instruction. Most
notably, a :exc:`KeyboardInterrupt` may appear at any point during execution. Most Pyt... | trusted_official_docs | CPython Docs | Note on Signal Handlers and Exceptions --------------------------------------
If a signal handler raises an exception, the exception will be propagated to
the main thread and may be raised after any :term:`bytecode` instruction. Most
notably, a :exc:`KeyboardInterrupt` may appear at any point during execution. Most Pyt... | Note on Signal Handlers and Exceptions --------------------------------------
If a signal handler raises an exception, the exception will be propagated to
the main thread and may be raised after any :term:`bytecode` instruction. Most
notably, a :exc:`KeyboardInterrupt` may appear at any point during execution. Most Pyt... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
260966b6-2d36-42b7-ae1a-aac4da7af9af | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,676 | supabase-export-v2 | e19b887b5e6df06c | .. function:: alarm(time)
If *time* is non-zero, this function requests that a :const:`SIGALRM` signal be
sent to the process in *time* seconds. Any previously scheduled alarm is
canceled (only one alarm can be scheduled at any time). The returned value is
then the number of seconds before any previously set alarm w... | trusted_official_docs | CPython Docs | .. function:: alarm(time)
If *time* is non-zero, this function requests that a :const:`SIGALRM` signal be
sent to the process in *time* seconds. Any previously scheduled alarm is
canceled (only one alarm can be scheduled at any time). The returned value is
then the number of seconds before any previously set alarm w... | .. function:: alarm(time)
If *time* is non-zero, this function requests that a :const:`SIGALRM` signal be
sent to the process in *time* seconds. Any previously scheduled alarm is
canceled (only one alarm can be scheduled at any time). The returned value is
then the number of seconds before any previously set alarm w... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
30b3d62b-7111-4dfd-8263-55d2d78208b0 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,662 | supabase-export-v2 | 659bc2a91189d81a | .. data:: ITIMER_PROF
Decrements interval timer both when the process executes and when the
system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL,
this timer is usually used to profile the time spent by the application
in user and kernel space. SIGPROF is delivered upon expiration. | trusted_official_docs | CPython Docs | .. data:: ITIMER_PROF
Decrements interval timer both when the process executes and when the
system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL,
this timer is usually used to profile the time spent by the application
in user and kernel space. SIGPROF is delivered upon expiration. | .. data:: ITIMER_PROF
Decrements interval timer both when the process executes and when the
system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL,
this timer is usually used to profile the time spent by the application
in user and kernel space. SIGPROF is delivered upon expiration. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
34ae1ae2-2872-4a03-bba1-e2395adc0e21 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,699 | supabase-export-v2 | 00a9970e4d69ec9b | .. function:: pthread_kill(thread_id, signalnum)
Send the signal *signalnum* to the thread *thread_id*, another thread in the
same process as the caller. The target thread can be executing any code
(Python or not). However, if the target thread is executing the Python
interpreter, the Python signal handlers will be ... | trusted_official_docs | CPython Docs | .. function:: pthread_kill(thread_id, signalnum)
Send the signal *signalnum* to the thread *thread_id*, another thread in the
same process as the caller. The target thread can be executing any code
(Python or not). However, if the target thread is executing the Python
interpreter, the Python signal handlers will be ... | .. function:: pthread_kill(thread_id, signalnum)
Send the signal *signalnum* to the thread *thread_id*, another thread in the
same process as the caller. The target thread can be executing any code
(Python or not). However, if the target thread is executing the Python
interpreter, the Python signal handlers will be ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
364b07c9-5e9a-4386-8bcb-a1dc816fd63b | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,747 | supabase-export-v2 | 43cfd85f7036cb79 | .. function:: sigpending()
Examine the set of signals that are pending for delivery to the calling
thread (i.e., the signals which have been raised while blocked). Return the
set of the pending signals. | trusted_official_docs | CPython Docs | .. function:: sigpending()
Examine the set of signals that are pending for delivery to the calling
thread (i.e., the signals which have been raised while blocked). Return the
set of the pending signals. | .. function:: sigpending()
Examine the set of signals that are pending for delivery to the calling
thread (i.e., the signals which have been raised while blocked). Return the
set of the pending signals. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38b44629-311d-49ae-91a2-90278ca828c1 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,729 | supabase-export-v2 | d004355dcfd22a5e | to the wakeup fd. This can be used by a library to wakeup a poll or select call, allowing the signal to be fully processed.
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
enabled). If *fd* is -1, file descriptor wakeup is disabled. If not -1, *fd* must be non-blocking. It is up to the library t... | trusted_official_docs | CPython Docs | to the wakeup fd. This can be used by a library to wakeup a poll or select call, allowing the signal to be fully processed.
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
enabled). If *fd* is -1, file descriptor wakeup is disabled. If not -1, *fd* must be non-blocking. It is up to the library t... | to the wakeup fd. This can be used by a library to wakeup a poll or select call, allowing the signal to be fully processed.
The old wakeup fd is returned (or -1 if file descriptor wakeup was not
enabled). If *fd* is -1, file descriptor wakeup is disabled. If not -1, *fd* must be non-blocking. It is up to the library t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3b17a9b0-4bc5-4f64-9aa4-8a358c8d3749 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,650 | supabase-export-v2 | 68ad45e87f116f1c | .. data:: SIG*
All the signal numbers are defined symbolically. For example, the hangup signal
is defined as :const:`signal.SIGHUP`; the variable names are identical to the
names used in C programs, as found in ``<signal.h>``. The Unix man page for
'``signal``' lists the existing signals (on some systems this is
:m... | trusted_official_docs | CPython Docs | .. data:: SIG*
All the signal numbers are defined symbolically. For example, the hangup signal
is defined as :const:`signal.SIGHUP`; the variable names are identical to the
names used in C programs, as found in ``<signal.h>``. The Unix man page for
'``signal``' lists the existing signals (on some systems this is
:m... | .. data:: SIG*
All the signal numbers are defined symbolically. For example, the hangup signal
is defined as :const:`signal.SIGHUP`; the variable names are identical to the
names used in C programs, as found in ``<signal.h>``. The Unix man page for
'``signal``' lists the existing signals (on some systems this is
:m... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
401320ce-e418-4708-98b4-ffe9b634093d | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,696 | supabase-export-v2 | 57bbd6a36bd8c2c7 | does not currently support the *siginfo* parameter; it must be ``None``. The *flags* argument is provided for future extensions; no flag values are currently defined.
See the :manpage:`pidfd_send_signal(2)` man page for more information. | trusted_official_docs | CPython Docs | does not currently support the *siginfo* parameter; it must be ``None``. The *flags* argument is provided for future extensions; no flag values are currently defined.
See the :manpage:`pidfd_send_signal(2)` man page for more information. | does not currently support the *siginfo* parameter; it must be ``None``. The *flags* argument is provided for future extensions; no flag values are currently defined.
See the :manpage:`pidfd_send_signal(2)` man page for more information. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
40da9b2e-b7a7-41e3-a30c-da1e0685f6fa | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,719 | supabase-export-v2 | 150c77b765bd2aa4 | :func:`alarm`) and after that every *interval* seconds (if *interval* is non-zero). The interval timer specified by *which* can be cleared by setting *seconds* to zero.
When an interval timer fires, a signal is sent to the process. The signal sent is dependent on the timer being used;
:const:`signal.ITIMER_REAL` will ... | trusted_official_docs | CPython Docs | :func:`alarm`) and after that every *interval* seconds (if *interval* is non-zero). The interval timer specified by *which* can be cleared by setting *seconds* to zero.
When an interval timer fires, a signal is sent to the process. The signal sent is dependent on the timer being used;
:const:`signal.ITIMER_REAL` will ... | :func:`alarm`) and after that every *interval* seconds (if *interval* is non-zero). The interval timer specified by *which* can be cleared by setting *seconds* to zero.
When an interval timer fires, a signal is sent to the process. The signal sent is dependent on the timer being used;
:const:`signal.ITIMER_REAL` will ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4326ebc2-1de8-490d-a771-2a2e4038ed07 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,613 | supabase-export-v2 | 1462e7089be62012 | .. data:: SIG_DFL
This is one of two standard signal handling options; it will simply perform
the default function for the signal. For example, on most systems the
default action for :const:`SIGQUIT` is to dump core and exit, while the
default action for :const:`SIGCHLD` is to simply ignore it. | trusted_official_docs | CPython Docs | .. data:: SIG_DFL
This is one of two standard signal handling options; it will simply perform
the default function for the signal. For example, on most systems the
default action for :const:`SIGQUIT` is to dump core and exit, while the
default action for :const:`SIGCHLD` is to simply ignore it. | .. data:: SIG_DFL
This is one of two standard signal handling options; it will simply perform
the default function for the signal. For example, on most systems the
default action for :const:`SIGQUIT` is to dump core and exit, while the
default action for :const:`SIGCHLD` is to simply ignore it. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4492852c-65de-4287-80c5-96ff212948c2 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,591 | supabase-export-v2 | 8f3162ba5d740b82 | raise the same signal again, causing Python to apparently hang. From Python 3.3 onwards, you can use the :mod:`faulthandler` module to report on synchronous errors.
* A long-running calculation implemented purely in C (such as regular
expression matching on a large body of text) may run uninterrupted for an
arbitrary... | trusted_official_docs | CPython Docs | raise the same signal again, causing Python to apparently hang. From Python 3.3 onwards, you can use the :mod:`faulthandler` module to report on synchronous errors.
* A long-running calculation implemented purely in C (such as regular
expression matching on a large body of text) may run uninterrupted for an
arbitrary... | raise the same signal again, causing Python to apparently hang. From Python 3.3 onwards, you can use the :mod:`faulthandler` module to report on synchronous errors.
* A long-running calculation implemented purely in C (such as regular
expression matching on a large body of text) may run uninterrupted for an
arbitrary... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
453544fb-0539-4c1a-9865-446ff3adbd01 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,745 | supabase-export-v2 | d3877b79bcfd6dec | frame object; for a description of frame objects, see the :ref:`description in the type hierarchy <frame-objects>` or see the attribute descriptions in the :mod:`inspect` module).
On Windows, :func:`signal` can only be called with :const:`SIGABRT`,
:const:`SIGFPE`, :const:`SIGILL`, :const:`SIGINT`, :const:`SIGSEGV`,
... | trusted_official_docs | CPython Docs | frame object; for a description of frame objects, see the :ref:`description in the type hierarchy <frame-objects>` or see the attribute descriptions in the :mod:`inspect` module).
On Windows, :func:`signal` can only be called with :const:`SIGABRT`,
:const:`SIGFPE`, :const:`SIGILL`, :const:`SIGINT`, :const:`SIGSEGV`,
... | frame object; for a description of frame objects, see the :ref:`description in the type hierarchy <frame-objects>` or see the attribute descriptions in the :mod:`inspect` module).
On Windows, :func:`signal` can only be called with :const:`SIGABRT`,
:const:`SIGFPE`, :const:`SIGILL`, :const:`SIGINT`, :const:`SIGSEGV`,
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4cb9f5af-6dc4-4414-b154-4917c4e9c45f | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,718 | supabase-export-v2 | 6d0d6bb9d99133cd | .. function:: setitimer(which, seconds, interval=0)
Sets given interval timer (one of :const:`signal.ITIMER_REAL`,
:const:`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified
by *which* to fire after *seconds* (rounded up to microseconds, different from
:func:`alarm`) and after that every *interval* sec... | trusted_official_docs | CPython Docs | .. function:: setitimer(which, seconds, interval=0)
Sets given interval timer (one of :const:`signal.ITIMER_REAL`,
:const:`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified
by *which* to fire after *seconds* (rounded up to microseconds, different from
:func:`alarm`) and after that every *interval* sec... | .. function:: setitimer(which, seconds, interval=0)
Sets given interval timer (one of :const:`signal.ITIMER_REAL`,
:const:`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified
by *which* to fire after *seconds* (rounded up to microseconds, different from
:func:`alarm`) and after that every *interval* sec... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
55f5068b-5e3a-4514-84b2-3e7a79391dee | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,585 | supabase-export-v2 | 71b4872dfeeafd74 | General rules -------------
The :func:`signal.signal` function allows defining custom handlers to be
executed when a signal is received. A small number of default handlers are
installed: :const:`SIGPIPE` is ignored (so write errors on pipes and sockets
can be reported as ordinary Python exceptions) and :const:`SIGINT` ... | trusted_official_docs | CPython Docs | General rules -------------
The :func:`signal.signal` function allows defining custom handlers to be
executed when a signal is received. A small number of default handlers are
installed: :const:`SIGPIPE` is ignored (so write errors on pipes and sockets
can be reported as ordinary Python exceptions) and :const:`SIGINT` ... | General rules -------------
The :func:`signal.signal` function allows defining custom handlers to be
executed when a signal is received. A small number of default handlers are
installed: :const:`SIGPIPE` is ignored (so write errors on pipes and sockets
can be reported as ordinary Python exceptions) and :const:`SIGINT` ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
566cacff-1b39-4e41-b285-31060339a1d1 | CPython Docs | file://datasets/cpython/Doc/library/signal.rst | unknown | 76e86209-9fc7-44ea-bddb-7e0f74b256e6 | 35,794 | supabase-export-v2 | b95054e205e6c57f | def __exit__(self, exc_type, exc_val, exc_tb): ... self.lock.release()
For many programs, especially those that merely want to exit on
:exc:`KeyboardInterrupt`, this is not a problem, but applications that are
complex or require high reliability should avoid raising exceptions from signal
handlers. They should also avo... | trusted_official_docs | CPython Docs | def __exit__(self, exc_type, exc_val, exc_tb): ... self.lock.release()
For many programs, especially those that merely want to exit on
:exc:`KeyboardInterrupt`, this is not a problem, but applications that are
complex or require high reliability should avoid raising exceptions from signal
handlers. They should also avo... | def __exit__(self, exc_type, exc_val, exc_tb): ... self.lock.release()
For many programs, especially those that merely want to exit on
:exc:`KeyboardInterrupt`, this is not a problem, but applications that are
complex or require high reliability should avoid raising exceptions from signal
handlers. They should also avo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.