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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c1f30d9-9a88-44b7-801c-4e10b40dafb9 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,624 | supabase-export-v2 | 5b291f621f870534 | An example::
>>> import array, fcntl, struct, termios, os
>>> os.getpgrp()
13341
>>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, " "))[0]
13341
>>> buf = array.array('h', [0])
>>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1)
0
>>> buf
array('h', [13341]) | trusted_official_docs | CPython Docs | An example::
>>> import array, fcntl, struct, termios, os
>>> os.getpgrp()
13341
>>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, " "))[0]
13341
>>> buf = array.array('h', [0])
>>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1)
0
>>> buf
array('h', [13341]) | An example::
>>> import array, fcntl, struct, termios, os
>>> os.getpgrp()
13341
>>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, " "))[0]
13341
>>> buf = array.array('h', [0])
>>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1)
0
>>> buf
array('h', [13341]) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8e38b163-b9ef-4051-93bc-2de5fcec1de6 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,593 | supabase-export-v2 | e9904a8d44c3c29e | ----------------
This module performs file and I/O control on file descriptors. It is an
interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages
for full details. | trusted_official_docs | CPython Docs | ----------------
This module performs file and I/O control on file descriptors. It is an
interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages
for full details. | ----------------
This module performs file and I/O control on file descriptors. It is an
interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages
for full details. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9015361c-2674-41d4-ac97-0b20af5a1a1a | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,596 | supabase-export-v2 | abd63e0975f2ec70 | file descriptor, such as returned by ``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin`` itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine file descriptor.
.. versionchanged:: 3.3
Operations in this module used to raise an :exc:`IOError` where they now
raise an :exc:... | trusted_official_docs | CPython Docs | file descriptor, such as returned by ``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin`` itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine file descriptor.
.. versionchanged:: 3.3
Operations in this module used to raise an :exc:`IOError` where they now
raise an :exc:... | file descriptor, such as returned by ``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin`` itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine file descriptor.
.. versionchanged:: 3.3
Operations in this module used to raise an :exc:`IOError` where they now
raise an :exc:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
930fa2cb-e675-48ac-9f38-9a41b4d56787 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,598 | supabase-export-v2 | 50dc686ab7fc45f4 | .. versionchanged:: 3.8 The :mod:`!fcntl` module now contains ``F_ADD_SEALS``, ``F_GET_SEALS``, and ``F_SEAL_*`` constants for sealing of :func:`os.memfd_create` file descriptors.
.. versionchanged:: 3.9
On macOS, the :mod:`!fcntl` module exposes the ``F_GETPATH`` constant,
which obtains the path of a file from a fil... | trusted_official_docs | CPython Docs | .. versionchanged:: 3.8 The :mod:`!fcntl` module now contains ``F_ADD_SEALS``, ``F_GET_SEALS``, and ``F_SEAL_*`` constants for sealing of :func:`os.memfd_create` file descriptors.
.. versionchanged:: 3.9
On macOS, the :mod:`!fcntl` module exposes the ``F_GETPATH`` constant,
which obtains the path of a file from a fil... | .. versionchanged:: 3.8 The :mod:`!fcntl` module now contains ``F_ADD_SEALS``, ``F_GET_SEALS``, and ``F_SEAL_*`` constants for sealing of :func:`os.memfd_create` file descriptors.
.. versionchanged:: 3.9
On macOS, the :mod:`!fcntl` module exposes the ``F_GETPATH`` constant,
which obtains the path of a file from a fil... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b51a766-096f-4100-9daa-a140aa6a6034 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,629 | supabase-export-v2 | 22777b6ad88b804a | .. function:: flock(fd, operation, /)
Perform the lock operation *operation* on file descriptor *fd* (file objects providing
a :meth:`~io.IOBase.fileno` method are accepted as well). See the Unix manual
:manpage:`flock(2)` for details. (On some systems, this function is emulated
using :c:func:`fcntl`.) | trusted_official_docs | CPython Docs | .. function:: flock(fd, operation, /)
Perform the lock operation *operation* on file descriptor *fd* (file objects providing
a :meth:`~io.IOBase.fileno` method are accepted as well). See the Unix manual
:manpage:`flock(2)` for details. (On some systems, this function is emulated
using :c:func:`fcntl`.) | .. function:: flock(fd, operation, /)
Perform the lock operation *operation* on file descriptor *fd* (file objects providing
a :meth:`~io.IOBase.fileno` method are accepted as well). See the Unix manual
:manpage:`flock(2)` for details. (On some systems, this function is emulated
using :c:func:`fcntl`.) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9bf6f04a-89da-4711-8d58-b28e8ee0f412 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,595 | supabase-export-v2 | 2f77b3c343c07f9c | .. availability:: Unix, not WASI.
All functions in this module take a file descriptor *fd* as their first
argument. This can be an integer file descriptor, such as returned by
``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin``
itself, which provides a :meth:`~io.IOBase.fileno` that returns a... | trusted_official_docs | CPython Docs | .. availability:: Unix, not WASI.
All functions in this module take a file descriptor *fd* as their first
argument. This can be an integer file descriptor, such as returned by
``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin``
itself, which provides a :meth:`~io.IOBase.fileno` that returns a... | .. availability:: Unix, not WASI.
All functions in this module take a file descriptor *fd* as their first
argument. This can be an integer file descriptor, such as returned by
``sys.stdin.fileno()``, or an :class:`io.IOBase` object, such as ``sys.stdin``
itself, which provides a :meth:`~io.IOBase.fileno` that returns a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9dae4cfb-8bcd-4d20-9acf-f7e6ced16d71 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,625 | supabase-export-v2 | d7afeeef6b302f68 | >>> os.getpgrp() 13341 >>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, " "))[0] 13341 >>> buf = array.array('h', [0]) >>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1) 0 >>> buf array('h', [13341])
.. audit-event:: fcntl.ioctl fd,request,arg fcntl.ioctl | trusted_official_docs | CPython Docs | >>> os.getpgrp() 13341 >>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, " "))[0] 13341 >>> buf = array.array('h', [0]) >>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1) 0 >>> buf array('h', [13341])
.. audit-event:: fcntl.ioctl fd,request,arg fcntl.ioctl | >>> os.getpgrp() 13341 >>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, " "))[0] 13341 >>> buf = array.array('h', [0]) >>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1) 0 >>> buf array('h', [13341])
.. audit-event:: fcntl.ioctl fd,request,arg fcntl.ioctl | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a2cbc580-4e0a-4d45-935e-95b1bf26af7f | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,637 | supabase-export-v2 | 2db29ae363f18528 | check for both values). On at least some systems, :const:`!LOCK_EX` can only be used if the file descriptor refers to a file opened for writing.
*len* is the number of bytes to lock, *start* is the byte offset at
which the lock starts, relative to *whence*, and *whence* is as with
:func:`io.IOBase.seek`, specifically... | trusted_official_docs | CPython Docs | check for both values). On at least some systems, :const:`!LOCK_EX` can only be used if the file descriptor refers to a file opened for writing.
*len* is the number of bytes to lock, *start* is the byte offset at
which the lock starts, relative to *whence*, and *whence* is as with
:func:`io.IOBase.seek`, specifically... | check for both values). On at least some systems, :const:`!LOCK_EX` can only be used if the file descriptor refers to a file opened for writing.
*len* is the number of bytes to lock, *start* is the byte offset at
which the lock starts, relative to *whence*, and *whence* is as with
:func:`io.IOBase.seek`, specifically... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a53d159b-29cb-4f2f-814b-03d7d84a403a | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,647 | supabase-export-v2 | 855ee96f1f6622c0 | .. seealso::
Module :mod:`os`
If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are
present in the :mod:`os` module (on BSD only), the :func:`os.open`
function provides an alternative to the :func:`lockf` and :func:`flock`
functions. | trusted_official_docs | CPython Docs | .. seealso::
Module :mod:`os`
If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are
present in the :mod:`os` module (on BSD only), the :func:`os.open`
function provides an alternative to the :func:`lockf` and :func:`flock`
functions. | .. seealso::
Module :mod:`os`
If the locking flags :const:`~os.O_SHLOCK` and :const:`~os.O_EXLOCK` are
present in the :mod:`os` module (on BSD only), the :func:`os.open`
function provides an alternative to the :func:`lockf` and :func:`flock`
functions. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a69015a4-582c-47ac-b070-90a66c8bd1df | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,604 | supabase-export-v2 | d7601d3db2b373a7 | the ``F_CLOSEM`` constant. On NetBSD, the :mod:`!fcntl` module exposes the ``F_MAXFD`` constant. On macOS and NetBSD, the :mod:`!fcntl` module exposes the ``F_GETNOSIGPIPE`` and ``F_SETNOSIGPIPE`` constant.
.. versionchanged:: 3.14
On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY``
to query a fil... | trusted_official_docs | CPython Docs | the ``F_CLOSEM`` constant. On NetBSD, the :mod:`!fcntl` module exposes the ``F_MAXFD`` constant. On macOS and NetBSD, the :mod:`!fcntl` module exposes the ``F_GETNOSIGPIPE`` and ``F_SETNOSIGPIPE`` constant.
.. versionchanged:: 3.14
On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY``
to query a fil... | the ``F_CLOSEM`` constant. On NetBSD, the :mod:`!fcntl` module exposes the ``F_MAXFD`` constant. On macOS and NetBSD, the :mod:`!fcntl` module exposes the ``F_GETNOSIGPIPE`` and ``F_SETNOSIGPIPE`` constant.
.. versionchanged:: 3.14
On Linux >= 6.1, the :mod:`!fcntl` module exposes the ``F_DUPFD_QUERY``
to query a fil... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c21820cf-df61-4dc1-9f99-98b9065b89ab | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,600 | supabase-export-v2 | 5e6389cefa313bfd | versionchanged:: 3.10 On Linux >= 2.6.11, the :mod:`!fcntl` module exposes the ``F_GETPIPE_SZ`` and ``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's size respectively.
.. versionchanged:: 3.11
On FreeBSD, the :mod:`!fcntl` module exposes the ``F_DUP2FD`` and
``F_DUP2FD_CLOEXEC`` constants, which a... | trusted_official_docs | CPython Docs | versionchanged:: 3.10 On Linux >= 2.6.11, the :mod:`!fcntl` module exposes the ``F_GETPIPE_SZ`` and ``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's size respectively.
.. versionchanged:: 3.11
On FreeBSD, the :mod:`!fcntl` module exposes the ``F_DUP2FD`` and
``F_DUP2FD_CLOEXEC`` constants, which a... | versionchanged:: 3.10 On Linux >= 2.6.11, the :mod:`!fcntl` module exposes the ``F_GETPIPE_SZ`` and ``F_SETPIPE_SZ`` constants, which allow to check and modify a pipe's size respectively.
.. versionchanged:: 3.11
On FreeBSD, the :mod:`!fcntl` module exposes the ``F_DUP2FD`` and
``F_DUP2FD_CLOEXEC`` constants, which a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cee0d1f4-61da-4dd8-a360-009c25079e16 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,621 | supabase-export-v2 | b76a544e2664a93d | long it is first copied into a static buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back into the supplied buffer.
If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised. | trusted_official_docs | CPython Docs | long it is first copied into a static buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back into the supplied buffer.
If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised. | long it is first copied into a static buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back into the supplied buffer.
If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
db5a3f43-9e1a-4458-91d1-5129b0fe6a91 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,622 | supabase-export-v2 | 2126583cd460a7d6 | If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised.
.. note::
If the type or size of *arg* does not match the type or size
of the operation's argument (for example, if an integer is
passed when a pointer is expected, or the information returned in
the buffer by the operating system is larger t... | trusted_official_docs | CPython Docs | If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised.
.. note::
If the type or size of *arg* does not match the type or size
of the operation's argument (for example, if an integer is
passed when a pointer is expected, or the information returned in
the buffer by the operating system is larger t... | If the :c:func:`ioctl` call fails, an :exc:`OSError` exception is raised.
.. note::
If the type or size of *arg* does not match the type or size
of the operation's argument (for example, if an integer is
passed when a pointer is expected, or the information returned in
the buffer by the operating system is larger t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e9333191-79c7-4116-901e-7ed9876b94cf | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,619 | supabase-export-v2 | 35f5a76df8c1dc6a | The type and size of *arg* must match the type and size of the argument of the operation as specified in the relevant C documentation.
If *arg* does not support the read-write buffer interface or
the *mutate_flag* is false, behavior is as for the :func:`~fcntl.fcntl`
function. | trusted_official_docs | CPython Docs | The type and size of *arg* must match the type and size of the argument of the operation as specified in the relevant C documentation.
If *arg* does not support the read-write buffer interface or
the *mutate_flag* is false, behavior is as for the :func:`~fcntl.fcntl`
function. | The type and size of *arg* must match the type and size of the argument of the operation as specified in the relevant C documentation.
If *arg* does not support the read-write buffer interface or
the *mutate_flag* is false, behavior is as for the :func:`~fcntl.fcntl`
function. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e955bcf5-08c8-4907-b9c7-28ee8639ab91 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,608 | supabase-export-v2 | b1c1a41f6ee8a8ce | The type and size of *arg* must match the type and size of the argument of the operation as specified in the relevant C documentation.
When *arg* is an integer, the function returns the integer
return value of the C :c:func:`fcntl` call. | trusted_official_docs | CPython Docs | The type and size of *arg* must match the type and size of the argument of the operation as specified in the relevant C documentation.
When *arg* is an integer, the function returns the integer
return value of the C :c:func:`fcntl` call. | The type and size of *arg* must match the type and size of the argument of the operation as specified in the relevant C documentation.
When *arg* is an integer, the function returns the integer
return value of the C :c:func:`fcntl` call. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
eb38822f-7aff-41da-8b08-4b955b211104 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,594 | supabase-export-v2 | 4ab58e093990c70f | on file descriptors. It is an interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages for full details.
.. availability:: Unix, not WASI. | trusted_official_docs | CPython Docs | on file descriptors. It is an interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages for full details.
.. availability:: Unix, not WASI. | on file descriptors. It is an interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. See the :manpage:`fcntl(2)` and :manpage:`ioctl(2)` Unix manual pages for full details.
.. availability:: Unix, not WASI. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
efd3a5ac-49ac-40d7-b861-3deb2c8ee737 | CPython Docs | file://datasets/cpython/Doc/library/fcntl.rst | unknown | f4fcfb2a-7a3c-48cc-b87d-68735d4b9adf | 10,638 | supabase-export-v2 | e39b5f246ed58b43 | number of bytes to lock, *start* is the byte offset at which the lock starts, relative to *whence*, and *whence* is as with :func:`io.IOBase.seek`, specifically:
* ``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)
* ``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)
* ``2`` -- rel... | trusted_official_docs | CPython Docs | number of bytes to lock, *start* is the byte offset at which the lock starts, relative to *whence*, and *whence* is as with :func:`io.IOBase.seek`, specifically:
* ``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)
* ``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)
* ``2`` -- rel... | number of bytes to lock, *start* is the byte offset at which the lock starts, relative to *whence*, and *whence* is as with :func:`io.IOBase.seek`, specifically:
* ``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)
* ``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)
* ``2`` -- rel... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
004192cc-0159-4159-875d-c23f7d25b38e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,053 | supabase-export-v2 | d15c8f3205e0dc80 | .. function:: ondrag(fun, btn=1, add=None)
:param fun: a function with two arguments which will be called with the
coordinates of the clicked point on the canvas
:param btn: number of the mouse-button, defaults to 1 (left mouse button)
:param add: ``True`` or ``False`` -- if ``True``, a new binding will be
added, o... | trusted_official_docs | CPython Docs | .. function:: ondrag(fun, btn=1, add=None)
:param fun: a function with two arguments which will be called with the
coordinates of the clicked point on the canvas
:param btn: number of the mouse-button, defaults to 1 (left mouse button)
:param add: ``True`` or ``False`` -- if ``True``, a new binding will be
added, o... | .. function:: ondrag(fun, btn=1, add=None)
:param fun: a function with two arguments which will be called with the
coordinates of the clicked point on the canvas
:param btn: number of the mouse-button, defaults to 1 (left mouse button)
:param add: ``True`` or ``False`` -- if ``True``, a new binding will be
added, o... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0308c8b3-1014-40a3-b4e9-54762d83a4f8 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,674 | supabase-export-v2 | ed0ead15f983d323 | forward(100)
You should see (most likely, in a new window on your display) a line
drawn by the turtle, heading East. Change the direction of the turtle,
so that it turns 120 degrees left (anti-clockwise):: | trusted_official_docs | CPython Docs | forward(100)
You should see (most likely, in a new window on your display) a line
drawn by the turtle, heading East. Change the direction of the turtle,
so that it turns 120 degrees left (anti-clockwise):: | forward(100)
You should see (most likely, in a new window on your display) a line
drawn by the turtle, heading East. Change the direction of the turtle,
so that it turns 120 degrees left (anti-clockwise):: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
036734c2-9fac-45d1-88c0-dfa9fd55102e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,898 | supabase-export-v2 | 6c4b39f972da2cad | >>> turtle.home() >>> turtle.left(90) >>> turtle.heading() 90.0
>>> # Change angle measurement unit to grad (also known as gon,
>>> # grade, or gradian and equals 1/100-th of the right angle.)
>>> turtle.degrees(400.0)
>>> turtle.heading()
100.0
>>> turtle.degrees(360)
>>> turtle.heading()
90.0 | trusted_official_docs | CPython Docs | >>> turtle.home() >>> turtle.left(90) >>> turtle.heading() 90.0
>>> # Change angle measurement unit to grad (also known as gon,
>>> # grade, or gradian and equals 1/100-th of the right angle.)
>>> turtle.degrees(400.0)
>>> turtle.heading()
100.0
>>> turtle.degrees(360)
>>> turtle.heading()
90.0 | >>> turtle.home() >>> turtle.left(90) >>> turtle.heading() 90.0
>>> # Change angle measurement unit to grad (also known as gon,
>>> # grade, or gradian and equals 1/100-th of the right angle.)
>>> turtle.degrees(400.0)
>>> turtle.heading()
100.0
>>> turtle.degrees(360)
>>> turtle.heading()
90.0 | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
04c01b5e-e5cc-4d22-bbfc-06d7a3fdd4c0 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,291 | supabase-export-v2 | 61c9b763f32d8225 | .. class:: Vec2D(x, y)
A two-dimensional vector class, used as a helper class for implementing
turtle graphics. May be useful for turtle graphics programs too. Derived
from tuple, so a vector is a tuple! | trusted_official_docs | CPython Docs | .. class:: Vec2D(x, y)
A two-dimensional vector class, used as a helper class for implementing
turtle graphics. May be useful for turtle graphics programs too. Derived
from tuple, so a vector is a tuple! | .. class:: Vec2D(x, y)
A two-dimensional vector class, used as a helper class for implementing
turtle graphics. May be useful for turtle graphics programs too. Derived
from tuple, so a vector is a tuple! | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0538a95c-d68e-4a72-86d3-944181a61813 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,015 | supabase-export-v2 | d457a18698d922fc | its stretchfactors: *stretch_wid* is stretchfactor perpendicular to its orientation, *stretch_len* is stretchfactor in direction of its orientation, *outline* determines the width of the shape's outline.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | its stretchfactors: *stretch_wid* is stretchfactor perpendicular to its orientation, *stretch_len* is stretchfactor in direction of its orientation, *outline* determines the width of the shape's outline.
.. doctest::
:skipif: _tkinter is None | its stretchfactors: *stretch_wid* is stretchfactor perpendicular to its orientation, *stretch_len* is stretchfactor in direction of its orientation, *outline* determines the width of the shape's outline.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
054b8ee0-d9aa-4d07-a34a-c50d8c6ab5ab | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,665 | supabase-export-v2 | e9106ddaf347fb2c | learners to encounter programming concepts and interaction with software, as it provides instant, visible feedback. It also provides convenient access to graphical output in general.
Turtle drawing was originally created as an educational tool, to be used by
teachers in the classroom. For the programmer who needs to pr... | trusted_official_docs | CPython Docs | learners to encounter programming concepts and interaction with software, as it provides instant, visible feedback. It also provides convenient access to graphical output in general.
Turtle drawing was originally created as an educational tool, to be used by
teachers in the classroom. For the programmer who needs to pr... | learners to encounter programming concepts and interaction with software, as it provides instant, visible feedback. It also provides convenient access to graphical output in general.
Turtle drawing was originally created as an educational tool, to be used by
teachers in the classroom. For the programmer who needs to pr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
07041609-dbf1-458a-96fa-de7c58c30022 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,233 | supabase-export-v2 | dc90205317b19602 | (4) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape` object: Install the corresponding compound shape.
Add a turtle shape to TurtleScreen's shapelist. Only thusly registered
shapes can be used by issuing the command ``shape(shapename)``. | trusted_official_docs | CPython Docs | (4) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape` object: Install the corresponding compound shape.
Add a turtle shape to TurtleScreen's shapelist. Only thusly registered
shapes can be used by issuing the command ``shape(shapename)``. | (4) *name* is an arbitrary string and *shape* is a (compound) :class:`Shape` object: Install the corresponding compound shape.
Add a turtle shape to TurtleScreen's shapelist. Only thusly registered
shapes can be used by issuing the command ``shape(shapename)``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
07741048-a973-41f2-b05c-2f474461ba5e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,137 | supabase-export-v2 | 976d1251e80124a9 | .. function:: setworldcoordinates(llx, lly, urx, ury)
:param llx: a number, x-coordinate of lower left corner of canvas
:param lly: a number, y-coordinate of lower left corner of canvas
:param urx: a number, x-coordinate of upper right corner of canvas
:param ury: a number, y-coordinate of upper right corner of canv... | trusted_official_docs | CPython Docs | .. function:: setworldcoordinates(llx, lly, urx, ury)
:param llx: a number, x-coordinate of lower left corner of canvas
:param lly: a number, y-coordinate of lower left corner of canvas
:param urx: a number, x-coordinate of upper right corner of canvas
:param ury: a number, y-coordinate of upper right corner of canv... | .. function:: setworldcoordinates(llx, lly, urx, ury)
:param llx: a number, x-coordinate of lower left corner of canvas
:param lly: a number, y-coordinate of lower left corner of canvas
:param urx: a number, x-coordinate of upper right corner of canvas
:param ury: a number, y-coordinate of upper right corner of canv... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
07ed2c3d-625a-4867-ae23-3842626b2871 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,718 | supabase-export-v2 | 408589517f36b3e6 | becomes ``turtle.fd()``, ``width()`` becomes ``turtle.width()`` and so on. (If typing "turtle" over and over again becomes tedious, use for example ``import turtle as t`` instead.)
Use turtle graphics in a script
------------------------------- | trusted_official_docs | CPython Docs | becomes ``turtle.fd()``, ``width()`` becomes ``turtle.width()`` and so on. (If typing "turtle" over and over again becomes tedious, use for example ``import turtle as t`` instead.)
Use turtle graphics in a script
------------------------------- | becomes ``turtle.fd()``, ``width()`` becomes ``turtle.width()`` and so on. (If typing "turtle" over and over again becomes tedious, use for example ``import turtle as t`` instead.)
Use turtle graphics in a script
------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0a81548b-425f-48de-bf80-3fdb7f627ef7 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,188 | supabase-export-v2 | a1eda797d3811dc2 | .. doctest:: :skipif: _tkinter is None
>>> running = True
>>> def f():
... if running:
... fd(50)
... lt(60)
... screen.ontimer(f, 250)
>>> f() ### makes the turtle march around
>>> running = False | trusted_official_docs | CPython Docs | .. doctest:: :skipif: _tkinter is None
>>> running = True
>>> def f():
... if running:
... fd(50)
... lt(60)
... screen.ontimer(f, 250)
>>> f() ### makes the turtle march around
>>> running = False | .. doctest:: :skipif: _tkinter is None
>>> running = True
>>> def f():
... if running:
... fd(50)
... lt(60)
... screen.ontimer(f, 250)
>>> f() ### makes the turtle march around
>>> running = False | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0e406216-4ff3-465d-9478-8615faf9aafb | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,840 | supabase-export-v2 | 90ab74fa4961ae25 | shape onto the canvas at the current turtle position. Return a stamp_id for that stamp, which can be used to delete it by calling ``clearstamp(stamp_id)``.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | shape onto the canvas at the current turtle position. Return a stamp_id for that stamp, which can be used to delete it by calling ``clearstamp(stamp_id)``.
.. doctest::
:skipif: _tkinter is None | shape onto the canvas at the current turtle position. Return a stamp_id for that stamp, which can be used to delete it by calling ``clearstamp(stamp_id)``.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
10bdd11e-851c-45ec-b375-4db70d93d4af | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,049 | supabase-export-v2 | 85b4498b1bbfcb26 | 1 (left mouse button) :param add: ``True`` or ``False`` -- if ``True``, a new binding will be added, otherwise it will replace a former binding
Bind *fun* to mouse-button-release events on this turtle. If *fun* is
``None``, existing bindings are removed. | trusted_official_docs | CPython Docs | 1 (left mouse button) :param add: ``True`` or ``False`` -- if ``True``, a new binding will be added, otherwise it will replace a former binding
Bind *fun* to mouse-button-release events on this turtle. If *fun* is
``None``, existing bindings are removed. | 1 (left mouse button) :param add: ``True`` or ``False`` -- if ``True``, a new binding will be added, otherwise it will replace a former binding
Bind *fun* to mouse-button-release events on this turtle. If *fun* is
``None``, existing bindings are removed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
11e9a1d2-1e07-46c3-951e-9f5c8ea0b9f9 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,087 | supabase-export-v2 | 2e5275bcd46eda70 | installed. *size* gives the maximum number of turtle actions that can be undone by the :func:`undo` method/function. If *size* is ``None``, the undobuffer is disabled.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | installed. *size* gives the maximum number of turtle actions that can be undone by the :func:`undo` method/function. If *size* is ``None``, the undobuffer is disabled.
.. doctest::
:skipif: _tkinter is None | installed. *size* gives the maximum number of turtle actions that can be undone by the :func:`undo` method/function. If *size* is ``None``, the undobuffer is disabled.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1327affa-55bb-47c8-990d-fa375b337959 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,862 | supabase-export-v2 | 66ebf2828aecb031 | Speeds from 1 to 10 enforce increasingly faster animation of line drawing and turtle turning.
Attention: *speed* = 0 means that *no* animation takes
place. forward/back makes turtle jump and likewise left/right make the
turtle turn instantly. | trusted_official_docs | CPython Docs | Speeds from 1 to 10 enforce increasingly faster animation of line drawing and turtle turning.
Attention: *speed* = 0 means that *no* animation takes
place. forward/back makes turtle jump and likewise left/right make the
turtle turn instantly. | Speeds from 1 to 10 enforce increasingly faster animation of line drawing and turtle turning.
Attention: *speed* = 0 means that *no* animation takes
place. forward/back makes turtle jump and likewise left/right make the
turtle turn instantly. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
13a92fc4-87b5-441b-8bcd-5a48b7497111 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,298 | supabase-export-v2 | 4b28ae8c4b1d0da7 | create a drawing surface - a *canvas* will need to be provided or created for it. The *canvas* can be a :class:`!tkinter.Canvas`, :class:`ScrolledCanvas` or :class:`TurtleScreen`.
:class:`TurtleScreen` is the basic drawing surface for a
turtle. :class:`Screen` is a subclass of ``TurtleScreen``, and
includes :ref:`some ... | trusted_official_docs | CPython Docs | create a drawing surface - a *canvas* will need to be provided or created for it. The *canvas* can be a :class:`!tkinter.Canvas`, :class:`ScrolledCanvas` or :class:`TurtleScreen`.
:class:`TurtleScreen` is the basic drawing surface for a
turtle. :class:`Screen` is a subclass of ``TurtleScreen``, and
includes :ref:`some ... | create a drawing surface - a *canvas* will need to be provided or created for it. The *canvas* can be a :class:`!tkinter.Canvas`, :class:`ScrolledCanvas` or :class:`TurtleScreen`.
:class:`TurtleScreen` is the basic drawing surface for a
turtle. :class:`Screen` is a subclass of ``TurtleScreen``, and
includes :ref:`some ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1412a556-cbd0-4afb-95c1-78ae583c7a3f | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,340 | supabase-export-v2 | 355ffec82ee380a3 | *using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its ``-n`` switch ("no subprocess"). This will prevent :func:`exitonclick` to enter the mainloop.
There can be a :file:`turtle.cfg` file in the directory where :mod:`!turtle` is
stored and an additional one in the current working directory. The latt... | trusted_official_docs | CPython Docs | *using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its ``-n`` switch ("no subprocess"). This will prevent :func:`exitonclick` to enter the mainloop.
There can be a :file:`turtle.cfg` file in the directory where :mod:`!turtle` is
stored and an additional one in the current working directory. The latt... | *using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its ``-n`` switch ("no subprocess"). This will prevent :func:`exitonclick` to enter the mainloop.
There can be a :file:`turtle.cfg` file in the directory where :mod:`!turtle` is
stored and an additional one in the current working directory. The latt... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1515be55-34c2-48be-b5a7-3713e65e5965 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,338 | supabase-export-v2 | 5f784f0882764938 | Short explanation of selected entries:
- The first four lines correspond to the arguments of the :func:`Screen.setup <setup>`
method. - Line 5 and 6 correspond to the arguments of the method
:func:`Screen.screensize <screensize>`. - *shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For more
info tr... | trusted_official_docs | CPython Docs | Short explanation of selected entries:
- The first four lines correspond to the arguments of the :func:`Screen.setup <setup>`
method. - Line 5 and 6 correspond to the arguments of the method
:func:`Screen.screensize <screensize>`. - *shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For more
info tr... | Short explanation of selected entries:
- The first four lines correspond to the arguments of the :func:`Screen.setup <setup>`
method. - Line 5 and 6 correspond to the arguments of the method
:func:`Screen.screensize <screensize>`. - *shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For more
info tr... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
16279818-dbda-4bd7-9f89-25b0645bf15b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,709 | supabase-export-v2 | a3ce1b6dfdabf319 | to work. Be warned that this is not always straightforward, so check this in advance if you're planning to use turtle graphics with a learner.
Automatically begin and end filling
----------------------------------- | trusted_official_docs | CPython Docs | to work. Be warned that this is not always straightforward, so check this in advance if you're planning to use turtle graphics with a learner.
Automatically begin and end filling
----------------------------------- | to work. Be warned that this is not always straightforward, so check this in advance if you're planning to use turtle graphics with a learner.
Automatically begin and end filling
----------------------------------- | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
16b95df7-800a-4474-b6be-f28a05a58e2f | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,947 | supabase-export-v2 | 1c66cd69e54079ed | >>> turtle.pencolor() (50.0, 193.0, 143.0) >>> turtle.fillcolor((50, 193, 143)) # Integers, not floats >>> turtle.fillcolor() (50.0, 193.0, 143.0) >>> turtle.fillcolor('#ffffff') >>> turtle.fillcolor() (255.0, 255.0, 255.0)
.. function:: color()
color(color, /)
color(r, g, b, /)
color(pencolor, fillcolor, /) | trusted_official_docs | CPython Docs | >>> turtle.pencolor() (50.0, 193.0, 143.0) >>> turtle.fillcolor((50, 193, 143)) # Integers, not floats >>> turtle.fillcolor() (50.0, 193.0, 143.0) >>> turtle.fillcolor('#ffffff') >>> turtle.fillcolor() (255.0, 255.0, 255.0)
.. function:: color()
color(color, /)
color(r, g, b, /)
color(pencolor, fillcolor, /) | >>> turtle.pencolor() (50.0, 193.0, 143.0) >>> turtle.fillcolor((50, 193, 143)) # Integers, not floats >>> turtle.fillcolor() (50.0, 193.0, 143.0) >>> turtle.fillcolor('#ffffff') >>> turtle.fillcolor() (255.0, 255.0, 255.0)
.. function:: color()
color(color, /)
color(r, g, b, /)
color(pencolor, fillcolor, /) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
17631baa-4653-4a2f-8126-56dfcea9c572 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,250 | supabase-export-v2 | 436c207a0571419b | Bind ``bye()`` method to mouse clicks on the Screen.
If the value "using_IDLE" in the configuration dictionary is ``False``
(default value), also enter mainloop. Remark: If IDLE with the ``-n`` switch
(no subprocess) is used, this value should be set to ``True`` in
:file:`turtle.cfg`. In this case IDLE's own mainloo... | trusted_official_docs | CPython Docs | Bind ``bye()`` method to mouse clicks on the Screen.
If the value "using_IDLE" in the configuration dictionary is ``False``
(default value), also enter mainloop. Remark: If IDLE with the ``-n`` switch
(no subprocess) is used, this value should be set to ``True`` in
:file:`turtle.cfg`. In this case IDLE's own mainloo... | Bind ``bye()`` method to mouse clicks on the Screen.
If the value "using_IDLE" in the configuration dictionary is ``False``
(default value), also enter mainloop. Remark: If IDLE with the ``-n`` switch
(no subprocess) is used, this value should be set to ``True`` in
:file:`turtle.cfg`. In this case IDLE's own mainloo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1b301101-09d7-4a83-b1e3-74307d09110d | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,344 | supabase-export-v2 | 7514029df6f69f08 | .. module:: turtledemo :synopsis: A viewer for example turtle scripts
The :mod:`!turtledemo` package includes a set of demo scripts. These
scripts can be run and viewed using the supplied demo viewer as follows:: | trusted_official_docs | CPython Docs | .. module:: turtledemo :synopsis: A viewer for example turtle scripts
The :mod:`!turtledemo` package includes a set of demo scripts. These
scripts can be run and viewed using the supplied demo viewer as follows:: | .. module:: turtledemo :synopsis: A viewer for example turtle scripts
The :mod:`!turtledemo` package includes a set of demo scripts. These
scripts can be run and viewed using the supplied demo viewer as follows:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1ce644e4-78f8-43b5-b875-e6ab72a57e9f | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,797 | supabase-export-v2 | 60c822ff43b01f43 | after teleporting. This can be disabled with fill_gap=True, which makes the imaginary line traveled during teleporting act as a fill barrier like in goto(x, y).
.. doctest::
:skipif: _tkinter is None
:hide: | trusted_official_docs | CPython Docs | after teleporting. This can be disabled with fill_gap=True, which makes the imaginary line traveled during teleporting act as a fill barrier like in goto(x, y).
.. doctest::
:skipif: _tkinter is None
:hide: | after teleporting. This can be disabled with fill_gap=True, which makes the imaginary line traveled during teleporting act as a fill barrier like in goto(x, y).
.. doctest::
:skipif: _tkinter is None
:hide: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1d54d895-bcba-45bf-a87b-1d635c9847ec | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,936 | supabase-export-v2 | ccc939b1d4091af4 | .. doctest:: :skipif: _tkinter is None
>>> colormode()
1.0
>>> turtle.pencolor()
'red'
>>> turtle.pencolor("brown")
>>> turtle.pencolor()
'brown'
>>> tup = (0.2, 0.8, 0.55)
>>> turtle.pencolor(tup)
>>> turtle.pencolor()
(0.2, 0.8, 0.5490196078431373)
>>> colormode(255)
>>> turtle.pencolor()
(51.0, 204.0, 1... | trusted_official_docs | CPython Docs | .. doctest:: :skipif: _tkinter is None
>>> colormode()
1.0
>>> turtle.pencolor()
'red'
>>> turtle.pencolor("brown")
>>> turtle.pencolor()
'brown'
>>> tup = (0.2, 0.8, 0.55)
>>> turtle.pencolor(tup)
>>> turtle.pencolor()
(0.2, 0.8, 0.5490196078431373)
>>> colormode(255)
>>> turtle.pencolor()
(51.0, 204.0, 1... | .. doctest:: :skipif: _tkinter is None
>>> colormode()
1.0
>>> turtle.pencolor()
'red'
>>> turtle.pencolor("brown")
>>> turtle.pencolor()
'brown'
>>> tup = (0.2, 0.8, 0.55)
>>> turtle.pencolor(tup)
>>> turtle.pencolor()
(0.2, 0.8, 0.5490196078431373)
>>> colormode(255)
>>> turtle.pencolor()
(51.0, 204.0, 1... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
21376c50-8c13-49bd-93b1-03fcc4b5a36b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,889 | supabase-export-v2 | 8bf8c929fc0eb5ef | :param x: a number or a pair/vector of numbers or a turtle instance :param y: a number if *x* is a number, else ``None``
Return the distance from the turtle to (x,y), the given vector, or the given
other turtle, in turtle step units. | trusted_official_docs | CPython Docs | :param x: a number or a pair/vector of numbers or a turtle instance :param y: a number if *x* is a number, else ``None``
Return the distance from the turtle to (x,y), the given vector, or the given
other turtle, in turtle step units. | :param x: a number or a pair/vector of numbers or a turtle instance :param y: a number if *x* is a number, else ``None``
Return the distance from the turtle to (x,y), the given vector, or the given
other turtle, in turtle step units. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
22e74c93-14fa-4b39-a2b6-8c013ac3f85b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,183 | supabase-export-v2 | 2f4263157b969a58 | screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will >>> # make the turtle move to the clicked point. >>> screen.onclick(None) # remove event binding again
.. note::
This TurtleScreen method is available as a global function only under the
name ``onscreenclick``. The global function ``onclic... | trusted_official_docs | CPython Docs | screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will >>> # make the turtle move to the clicked point. >>> screen.onclick(None) # remove event binding again
.. note::
This TurtleScreen method is available as a global function only under the
name ``onscreenclick``. The global function ``onclic... | screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will >>> # make the turtle move to the clicked point. >>> screen.onclick(None) # remove event binding again
.. note::
This TurtleScreen method is available as a global function only under the
name ``onscreenclick``. The global function ``onclic... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
25962593-2aad-4f54-a51b-3332c4810aac | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,258 | supabase-export-v2 | b66c84a833dfedf7 | .. function:: setup(width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"])
Set the size and position of the main window. Default values of arguments
are stored in the configuration dictionary and can be changed via a
:file:`turtle.cfg` file. | trusted_official_docs | CPython Docs | .. function:: setup(width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"])
Set the size and position of the main window. Default values of arguments
are stored in the configuration dictionary and can be changed via a
:file:`turtle.cfg` file. | .. function:: setup(width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"])
Set the size and position of the main window. Default values of arguments
are stored in the configuration dictionary and can be changed via a
:file:`turtle.cfg` file. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
27bc2e4b-242a-48cc-9e2c-965c947a86aa | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,708 | supabase-export-v2 | eaa700968386e67b | .. _note:
You'll need to have the :mod:`Tk interface package <tkinter>` installed on
your system for turtle graphics to work. Be warned that this is not
always straightforward, so check this in advance if you're planning to
use turtle graphics with a learner. | trusted_official_docs | CPython Docs | .. _note:
You'll need to have the :mod:`Tk interface package <tkinter>` installed on
your system for turtle graphics to work. Be warned that this is not
always straightforward, so check this in advance if you're planning to
use turtle graphics with a learner. | .. _note:
You'll need to have the :mod:`Tk interface package <tkinter>` installed on
your system for turtle graphics to work. Be warned that this is not
always straightforward, so check this in advance if you're planning to
use turtle graphics with a learner. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
29ecb271-91d3-4e63-b3f2-6391fea0008b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,750 | supabase-export-v2 | 74e5bc4f477ffbd9 | Using events | :func:`onclick` | :func:`onrelease` | :func:`ondrag`
Special Turtle methods
| :func:`poly`
| :func:`begin_poly`
| :func:`end_poly`
| :func:`get_poly`
| :func:`clone`
| :func:`getturtle` | :func:`getpen`
| :func:`getscreen`
| :func:`setundobuffer`
| :func:`undobufferentries` | trusted_official_docs | CPython Docs | Using events | :func:`onclick` | :func:`onrelease` | :func:`ondrag`
Special Turtle methods
| :func:`poly`
| :func:`begin_poly`
| :func:`end_poly`
| :func:`get_poly`
| :func:`clone`
| :func:`getturtle` | :func:`getpen`
| :func:`getscreen`
| :func:`setundobuffer`
| :func:`undobufferentries` | Using events | :func:`onclick` | :func:`onrelease` | :func:`ondrag`
Special Turtle methods
| :func:`poly`
| :func:`begin_poly`
| :func:`end_poly`
| :func:`get_poly`
| :func:`clone`
| :func:`getturtle` | :func:`getpen`
| :func:`getscreen`
| :func:`setundobuffer`
| :func:`undobufferentries` | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ae2f741-1819-4ac9-9cba-4e73d6c4813b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,253 | supabase-export-v2 | 853f9bea75bba4a7 | Save the current turtle drawing (and turtles) as a PostScript file.
:param filename: the path of the saved PostScript file
:param overwrite: if ``False`` and there already exists a file with the given
filename, then the function will raise a
``FileExistsError``. If it is ``True``, the file will be
overwritten. | trusted_official_docs | CPython Docs | Save the current turtle drawing (and turtles) as a PostScript file.
:param filename: the path of the saved PostScript file
:param overwrite: if ``False`` and there already exists a file with the given
filename, then the function will raise a
``FileExistsError``. If it is ``True``, the file will be
overwritten. | Save the current turtle drawing (and turtles) as a PostScript file.
:param filename: the path of the saved PostScript file
:param overwrite: if ``False`` and there already exists a file with the given
filename, then the function will raise a
``FileExistsError``. If it is ``True``, the file will be
overwritten. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2c4f8d34-40cf-4795-a102-4908c4ea3987 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,710 | supabase-export-v2 | 71c4450da3e76c0a | Automatically begin and end filling -----------------------------------
Starting with Python 3.14, you can use the :func:`fill` :term:`context manager`
instead of :func:`begin_fill` and :func:`end_fill` to automatically begin and
end fill. Here is an example:: | trusted_official_docs | CPython Docs | Automatically begin and end filling -----------------------------------
Starting with Python 3.14, you can use the :func:`fill` :term:`context manager`
instead of :func:`begin_fill` and :func:`end_fill` to automatically begin and
end fill. Here is an example:: | Automatically begin and end filling -----------------------------------
Starting with Python 3.14, you can use the :func:`fill` :term:`context manager`
instead of :func:`begin_fill` and :func:`end_fill` to automatically begin and
end fill. Here is an example:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2cbc0115-a6f7-4650-af61-0fe03fdbd9f8 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,365 | supabase-export-v2 | bb8f94ec92bef665 | .. doctest:: :skipif: _tkinter is None :hide:
>>> for turtle in turtles():
... turtle.reset()
>>> turtle.penup()
>>> turtle.goto(-200,25)
>>> turtle.pendown()
>>> turtle.write("No one expects the Spanish Inquisition!",
... font=("Arial", 20, "normal"))
>>> turtle.penup()
>>> turtle.goto(-100,-50)
>>> turtle.pe... | trusted_official_docs | CPython Docs | .. doctest:: :skipif: _tkinter is None :hide:
>>> for turtle in turtles():
... turtle.reset()
>>> turtle.penup()
>>> turtle.goto(-200,25)
>>> turtle.pendown()
>>> turtle.write("No one expects the Spanish Inquisition!",
... font=("Arial", 20, "normal"))
>>> turtle.penup()
>>> turtle.goto(-100,-50)
>>> turtle.pe... | .. doctest:: :skipif: _tkinter is None :hide:
>>> for turtle in turtles():
... turtle.reset()
>>> turtle.penup()
>>> turtle.goto(-200,25)
>>> turtle.pendown()
>>> turtle.write("No one expects the Spanish Inquisition!",
... font=("Arial", 20, "normal"))
>>> turtle.penup()
>>> turtle.goto(-100,-50)
>>> turtle.pe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ccaa00e-c0c5-40c7-ab82-5651ee83af18 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,226 | supabase-export-v2 | 0f11e62bf2252b84 | .. note:: Image shapes *do not* rotate when turning the turtle, so they do not display the heading of the turtle!
(2) *name* is an arbitrary string and *shape* is the name of an image file (PNG, GIF, PGM, and PPM): Install the
corresponding image shape. :: | trusted_official_docs | CPython Docs | .. note:: Image shapes *do not* rotate when turning the turtle, so they do not display the heading of the turtle!
(2) *name* is an arbitrary string and *shape* is the name of an image file (PNG, GIF, PGM, and PPM): Install the
corresponding image shape. :: | .. note:: Image shapes *do not* rotate when turning the turtle, so they do not display the heading of the turtle!
(2) *name* is an arbitrary string and *shape* is the name of an image file (PNG, GIF, PGM, and PPM): Install the
corresponding image shape. :: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ccae127-9f67-4fc2-b63d-9fb15cdd0a7b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,953 | supabase-export-v2 | fe942729419f6b7e | ``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))`` Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and analogously if the other input format is used.
If turtleshape is a polygon, outline and interior of that polygon is drawn
with the newly set colors. | trusted_official_docs | CPython Docs | ``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))`` Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and analogously if the other input format is used.
If turtleshape is a polygon, outline and interior of that polygon is drawn
with the newly set colors. | ``color(colorstring1, colorstring2)``, ``color((r1,g1,b1), (r2,g2,b2))`` Equivalent to ``pencolor(colorstring1)`` and ``fillcolor(colorstring2)`` and analogously if the other input format is used.
If turtleshape is a polygon, outline and interior of that polygon is drawn
with the newly set colors. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ce1ac88-dbe1-4e2f-a730-978ebdd3913d | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,293 | supabase-export-v2 | 14036716fc9656bf | Provides (for *a*, *b* vectors, *k* number):
* ``a + b`` vector addition
* ``a - b`` vector subtraction
* ``a * b`` inner product
* ``k * a`` and ``a * k`` multiplication with scalar
* ``abs(a)`` absolute value of a
* ``a.rotate(angle)`` rotation | trusted_official_docs | CPython Docs | Provides (for *a*, *b* vectors, *k* number):
* ``a + b`` vector addition
* ``a - b`` vector subtraction
* ``a * b`` inner product
* ``k * a`` and ``a * k`` multiplication with scalar
* ``abs(a)`` absolute value of a
* ``a.rotate(angle)`` rotation | Provides (for *a*, *b* vectors, *k* number):
* ``a + b`` vector addition
* ``a - b`` vector subtraction
* ``a * b`` inner product
* ``k * a`` and ``a * k`` multiplication with scalar
* ``abs(a)`` absolute value of a
* ``a.rotate(angle)`` rotation | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2ce6c2cb-16a5-46a7-9ed6-d45bc0347f99 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,199 | supabase-export-v2 | 76abd67f43863fc6 | If not, a hint is issued and the dialog remains open for correction. Return the number input. If the dialog is canceled, return ``None``. ::
>>> screen.numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000) | trusted_official_docs | CPython Docs | If not, a hint is issued and the dialog remains open for correction. Return the number input. If the dialog is canceled, return ``None``. ::
>>> screen.numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000) | If not, a hint is issued and the dialog remains open for correction. Return the number input. If the dialog is canceled, return ``None``. ::
>>> screen.numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2da477d1-1c49-4214-8499-02d90ee16e50 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,286 | supabase-export-v2 | ca4eb192778468fe | .. method:: addcomponent(poly, fill, outline=None)
:param poly: a polygon, i.e. a tuple of pairs of numbers
:param fill: a color the *poly* will be filled with
:param outline: a color for the poly's outline (if given) | trusted_official_docs | CPython Docs | .. method:: addcomponent(poly, fill, outline=None)
:param poly: a polygon, i.e. a tuple of pairs of numbers
:param fill: a color the *poly* will be filled with
:param outline: a color for the poly's outline (if given) | .. method:: addcomponent(poly, fill, outline=None)
:param poly: a polygon, i.e. a tuple of pairs of numbers
:param fill: a color the *poly* will be filled with
:param outline: a color for the poly's outline (if given) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2f9f7b09-b278-46e8-a5f9-c73fa42a225b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,706 | supabase-export-v2 | 4d7a95539bfd666f | makes this possible by exposing all its basic functionality as functions, available with ``from turtle import *``. The :ref:`turtle graphics tutorial <turtle-tutorial>` covers this approach.
It's worth noting that many of the turtle commands also have even more terse
equivalents, such as ``fd()`` for :func:`forward`. T... | trusted_official_docs | CPython Docs | makes this possible by exposing all its basic functionality as functions, available with ``from turtle import *``. The :ref:`turtle graphics tutorial <turtle-tutorial>` covers this approach.
It's worth noting that many of the turtle commands also have even more terse
equivalents, such as ``fd()`` for :func:`forward`. T... | makes this possible by exposing all its basic functionality as functions, available with ``from turtle import *``. The :ref:`turtle graphics tutorial <turtle-tutorial>` covers this approach.
It's worth noting that many of the turtle commands also have even more terse
equivalents, such as ``fd()`` for :func:`forward`. T... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
31b29ae8-d090-4ada-87e0-dd4f9ecb41be | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,941 | supabase-export-v2 | c5c2cfe8a42f2c92 | ``fillcolor()`` Return the current fillcolor as color specification string, possibly in tuple format (see example). May be used as input to another color/pencolor/fillcolor/bgcolor call.
``fillcolor(colorstring)``
Set fillcolor to *colorstring*, which is a Tk color specification string,
such as ``"red"``, ``"yellow"`... | trusted_official_docs | CPython Docs | ``fillcolor()`` Return the current fillcolor as color specification string, possibly in tuple format (see example). May be used as input to another color/pencolor/fillcolor/bgcolor call.
``fillcolor(colorstring)``
Set fillcolor to *colorstring*, which is a Tk color specification string,
such as ``"red"``, ``"yellow"`... | ``fillcolor()`` Return the current fillcolor as color specification string, possibly in tuple format (see example). May be used as input to another color/pencolor/fillcolor/bgcolor call.
``fillcolor(colorstring)``
Set fillcolor to *colorstring*, which is a Tk color specification string,
such as ``"red"``, ``"yellow"`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
32525caf-358f-470d-9220-b8bc9e42f76c | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,113 | supabase-export-v2 | 229a6c74e9170013 | Four input formats are allowed:
``bgcolor()``
Return the current background color as color specification string or
as a tuple (see example). May be used as input to another
color/pencolor/fillcolor/bgcolor call. | trusted_official_docs | CPython Docs | Four input formats are allowed:
``bgcolor()``
Return the current background color as color specification string or
as a tuple (see example). May be used as input to another
color/pencolor/fillcolor/bgcolor call. | Four input formats are allowed:
``bgcolor()``
Return the current background color as color specification string or
as a tuple (see example). May be used as input to another
color/pencolor/fillcolor/bgcolor call. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
325dd063-cc2b-4ad9-988f-a8f732ac9f55 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,034 | supabase-export-v2 | 264f1c2ba37d6e17 | Set or return the current transformation matrix of the turtle shape.
If none of the matrix elements are given, return the transformation
matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape
according to the matrix consisting of first row t11, t12 and
second row t21, t22. Th... | trusted_official_docs | CPython Docs | Set or return the current transformation matrix of the turtle shape.
If none of the matrix elements are given, return the transformation
matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape
according to the matrix consisting of first row t11, t12 and
second row t21, t22. Th... | Set or return the current transformation matrix of the turtle shape.
If none of the matrix elements are given, return the transformation
matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape
according to the matrix consisting of first row t11, t12 and
second row t21, t22. Th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
32c401b1-ace5-438d-9865-79b8d22a4976 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,328 | supabase-export-v2 | 7b49de7c9a407814 | dictionary will be written to the Python script :file:`{filename}.py`. It is intended to serve as a template for translation of the docstrings into different languages.
If you (or your students) want to use :mod:`!turtle` with online help in your
native language, you have to translate the docstrings and save the result... | trusted_official_docs | CPython Docs | dictionary will be written to the Python script :file:`{filename}.py`. It is intended to serve as a template for translation of the docstrings into different languages.
If you (or your students) want to use :mod:`!turtle` with online help in your
native language, you have to translate the docstrings and save the result... | dictionary will be written to the Python script :file:`{filename}.py`. It is intended to serve as a template for translation of the docstrings into different languages.
If you (or your students) want to use :mod:`!turtle` with online help in your
native language, you have to translate the docstrings and save the result... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
337108ef-13cc-4563-b7ce-663fdf469d4a | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,740 | supabase-export-v2 | fefed6c06c4fa5ec | Turtle methods --------------
Turtle motion
Move and draw
| :func:`forward` | :func:`fd`
| :func:`backward` | :func:`bk` | :func:`back`
| :func:`right` | :func:`rt`
| :func:`left` | :func:`lt`
| :func:`goto` | :func:`setpos` | :func:`setposition`
| :func:`teleport`
| :func:`setx`
| :func:`sety`
| :func:`sethe... | trusted_official_docs | CPython Docs | Turtle methods --------------
Turtle motion
Move and draw
| :func:`forward` | :func:`fd`
| :func:`backward` | :func:`bk` | :func:`back`
| :func:`right` | :func:`rt`
| :func:`left` | :func:`lt`
| :func:`goto` | :func:`setpos` | :func:`setposition`
| :func:`teleport`
| :func:`setx`
| :func:`sety`
| :func:`sethe... | Turtle methods --------------
Turtle motion
Move and draw
| :func:`forward` | :func:`fd`
| :func:`backward` | :func:`bk` | :func:`back`
| :func:`right` | :func:`rt`
| :func:`left` | :func:`lt`
| :func:`goto` | :func:`setpos` | :func:`setposition`
| :func:`teleport`
| :func:`setx`
| :func:`sety`
| :func:`sethe... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
34c2147f-b645-4d46-aa10-4924c7d4d989 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,254 | supabase-export-v2 | 5db6bc4174549737 | there already exists a file with the given filename, then the function will raise a ``FileExistsError``. If it is ``True``, the file will be overwritten.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | there already exists a file with the given filename, then the function will raise a ``FileExistsError``. If it is ``True``, the file will be overwritten.
.. doctest::
:skipif: _tkinter is None | there already exists a file with the given filename, then the function will raise a ``FileExistsError``. If it is ``True``, the file will be overwritten.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3528adc1-f15a-47c8-af15-ba79c07b2531 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,986 | supabase-export-v2 | 19ebfb9b40c74689 | be written to the TurtleScreen :param move: True/False :param align: one of the strings "left", "center" or right" :param font: a triple (fontname, fontsize, fonttype)
Write text - the string representation of *arg* - at the current turtle
position according to *align* ("left", "center" or "right") and with the given
... | trusted_official_docs | CPython Docs | be written to the TurtleScreen :param move: True/False :param align: one of the strings "left", "center" or right" :param font: a triple (fontname, fontsize, fonttype)
Write text - the string representation of *arg* - at the current turtle
position according to *align* ("left", "center" or "right") and with the given
... | be written to the TurtleScreen :param move: True/False :param align: one of the strings "left", "center" or right" :param font: a triple (fontname, fontsize, fonttype)
Write text - the string representation of *arg* - at the current turtle
position according to *align* ("left", "center" or "right") and with the given
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
35505016-ccee-4f75-ba72-0f35fc50b2f6 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,727 | supabase-export-v2 | af27d8dcb3f953d5 | .. seealso:: :ref:`Explanation of the object-oriented interface <turtle-explanation>`
Other than for very basic introductory purposes, or for trying things out
as quickly as possible, it's more usual and much more powerful to use the
object-oriented approach to turtle graphics. For example, this allows
multiple turtles... | trusted_official_docs | CPython Docs | .. seealso:: :ref:`Explanation of the object-oriented interface <turtle-explanation>`
Other than for very basic introductory purposes, or for trying things out
as quickly as possible, it's more usual and much more powerful to use the
object-oriented approach to turtle graphics. For example, this allows
multiple turtles... | .. seealso:: :ref:`Explanation of the object-oriented interface <turtle-explanation>`
Other than for very basic introductory purposes, or for trying things out
as quickly as possible, it's more usual and much more powerful to use the
object-oriented approach to turtle graphics. For example, this allows
multiple turtles... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3842110f-5b06-4c11-b6de-339e3c8c42c9 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,873 | supabase-export-v2 | 4a2af1265aa75964 | specified by (x,y), the vector or the other turtle. This depends on the turtle's start orientation which depends on the mode - "standard"/"world" or "logo".
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | specified by (x,y), the vector or the other turtle. This depends on the turtle's start orientation which depends on the mode - "standard"/"world" or "logo".
.. doctest::
:skipif: _tkinter is None | specified by (x,y), the vector or the other turtle. This depends on the turtle's start orientation which depends on the mode - "standard"/"world" or "logo".
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
38842692-f6b9-48e6-bd56-39593102c8d4 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,352 | supabase-export-v2 | a0f5d2ad8af51adb | .. tabularcolumns:: |l|L|L|
+------------------------+------------------------------+--------------------------------------+
| Name | Description | Features |
+========================+==============================+======================================+
| ``bytedesign`` | complex classical | :func:`tracer`, :func:`de... | trusted_official_docs | CPython Docs | .. tabularcolumns:: |l|L|L|
+------------------------+------------------------------+--------------------------------------+
| Name | Description | Features |
+========================+==============================+======================================+
| ``bytedesign`` | complex classical | :func:`tracer`, :func:`de... | .. tabularcolumns:: |l|L|L|
+------------------------+------------------------------+--------------------------------------+
| Name | Description | Features |
+========================+==============================+======================================+
| ``bytedesign`` | complex classical | :func:`tracer`, :func:`de... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3a2c1361-feca-4497-abfd-d857c153519c | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,152 | supabase-export-v2 | 887c728a311069e3 | :param delay: positive integer
Set or return the drawing *delay* in milliseconds. (This is approximately
the time interval between two consecutive canvas updates.) The longer the
drawing delay, the slower the animation. | trusted_official_docs | CPython Docs | :param delay: positive integer
Set or return the drawing *delay* in milliseconds. (This is approximately
the time interval between two consecutive canvas updates.) The longer the
drawing delay, the slower the animation. | :param delay: positive integer
Set or return the drawing *delay* in milliseconds. (This is approximately
the time interval between two consecutive canvas updates.) The longer the
drawing delay, the slower the animation. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3a38a45a-e3a6-4122-88a8-06c6c8b18632 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,211 | supabase-export-v2 | dd97cb6033980811 | Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* values of color triples have to be in the range 0..*cmode*.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* values of color triples have to be in the range 0..*cmode*.
.. doctest::
:skipif: _tkinter is None | Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* values of color triples have to be in the range 0..*cmode*.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3c3657c9-ba25-494c-a4e9-13f900abc109 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,334 | supabase-export-v2 | be61bae54282ba53 | in a classroom, you can prepare a configuration file ``turtle.cfg`` which will be read at import time and modify the configuration according to its settings.
The built in configuration would correspond to the following ``turtle.cfg``: | trusted_official_docs | CPython Docs | in a classroom, you can prepare a configuration file ``turtle.cfg`` which will be read at import time and modify the configuration according to its settings.
The built in configuration would correspond to the following ``turtle.cfg``: | in a classroom, you can prepare a configuration file ``turtle.cfg`` which will be read at import time and modify the configuration according to its settings.
The built in configuration would correspond to the following ``turtle.cfg``: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4174cdb8-9242-43d7-8a79-2e25a2a1097f | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,139 | supabase-export-v2 | dccc118550c0e8da | switch to mode "world" if necessary. This performs a ``screen.reset()``. If mode "world" is already active, all drawings are redrawn according to the new coordinates.
**ATTENTION**: in user-defined coordinate systems angles may appear
distorted. | trusted_official_docs | CPython Docs | switch to mode "world" if necessary. This performs a ``screen.reset()``. If mode "world" is already active, all drawings are redrawn according to the new coordinates.
**ATTENTION**: in user-defined coordinate systems angles may appear
distorted. | switch to mode "world" if necessary. This performs a ``screen.reset()``. If mode "world" is already active, all drawings are redrawn according to the new coordinates.
**ATTENTION**: in user-defined coordinate systems angles may appear
distorted. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
425c7857-4e90-4ea3-b134-bbefc322809b | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,950 | supabase-export-v2 | 4c33baac209399ca | Several input formats are allowed. They use 0 to 3 arguments as follows:
``color()``
Return the current pencolor and the current fillcolor as a pair of color
specification strings or tuples as returned by :func:`pencolor` and
:func:`fillcolor`. | trusted_official_docs | CPython Docs | Several input formats are allowed. They use 0 to 3 arguments as follows:
``color()``
Return the current pencolor and the current fillcolor as a pair of color
specification strings or tuples as returned by :func:`pencolor` and
:func:`fillcolor`. | Several input formats are allowed. They use 0 to 3 arguments as follows:
``color()``
Return the current pencolor and the current fillcolor as a pair of color
specification strings or tuples as returned by :func:`pencolor` and
:func:`fillcolor`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
42dc60ab-a590-4d0e-991b-e69786e46d3a | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,194 | supabase-export-v2 | f0e93002b5776525 | :param title: string :param prompt: string
Pop up a dialog window for input of a string. Parameter title is
the title of the dialog window, prompt is a text mostly describing
what information to input. Return the string input. If the dialog is canceled, return ``None``. :: | trusted_official_docs | CPython Docs | :param title: string :param prompt: string
Pop up a dialog window for input of a string. Parameter title is
the title of the dialog window, prompt is a text mostly describing
what information to input. Return the string input. If the dialog is canceled, return ``None``. :: | :param title: string :param prompt: string
Pop up a dialog window for input of a string. Parameter title is
the title of the dialog window, prompt is a text mostly describing
what information to input. Return the string input. If the dialog is canceled, return ``None``. :: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
443ff1e8-1e79-4a75-bc18-abba9b312c6e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,035 | supabase-export-v2 | 58d359016382c73c | * t22 - t12 * t21 must not be zero, otherwise an error is raised. Modify stretchfactor, shearfactor and tiltangle according to the given matrix.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | * t22 - t12 * t21 must not be zero, otherwise an error is raised. Modify stretchfactor, shearfactor and tiltangle according to the given matrix.
.. doctest::
:skipif: _tkinter is None | * t22 - t12 * t21 must not be zero, otherwise an error is raised. Modify stretchfactor, shearfactor and tiltangle according to the given matrix.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
44451798-22c6-42b1-940f-8df06d4d0d10 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,704 | supabase-export-v2 | af58569dc2446026 | Get started as quickly as possible ----------------------------------
One of the joys of turtle graphics is the immediate, visual feedback that's
available from simple commands - it's an excellent way to introduce children
to programming ideas, with a minimum of overhead (not just children, of
course). | trusted_official_docs | CPython Docs | Get started as quickly as possible ----------------------------------
One of the joys of turtle graphics is the immediate, visual feedback that's
available from simple commands - it's an excellent way to introduce children
to programming ideas, with a minimum of overhead (not just children, of
course). | Get started as quickly as possible ----------------------------------
One of the joys of turtle graphics is the immediate, visual feedback that's
available from simple commands - it's an excellent way to introduce children
to programming ideas, with a minimum of overhead (not just children, of
course). | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
445aadc0-8eee-4529-bed7-6cbaf8ff4518 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,741 | supabase-export-v2 | f01b47189b372c15 | :func:`teleport` | :func:`setx` | :func:`sety` | :func:`setheading` | :func:`seth` | :func:`home` | :func:`circle` | :func:`dot` | :func:`stamp` | :func:`clearstamp` | :func:`clearstamps` | :func:`undo` | :func:`speed`
Tell Turtle's state
| :func:`position` | :func:`pos`
| :func:`towards`
| :func:`xcor`
| :func:`yc... | trusted_official_docs | CPython Docs | :func:`teleport` | :func:`setx` | :func:`sety` | :func:`setheading` | :func:`seth` | :func:`home` | :func:`circle` | :func:`dot` | :func:`stamp` | :func:`clearstamp` | :func:`clearstamps` | :func:`undo` | :func:`speed`
Tell Turtle's state
| :func:`position` | :func:`pos`
| :func:`towards`
| :func:`xcor`
| :func:`yc... | :func:`teleport` | :func:`setx` | :func:`sety` | :func:`setheading` | :func:`seth` | :func:`home` | :func:`circle` | :func:`dot` | :func:`stamp` | :func:`clearstamp` | :func:`clearstamps` | :func:`undo` | :func:`speed`
Tell Turtle's state
| :func:`position` | :func:`pos`
| :func:`towards`
| :func:`xcor`
| :func:`yc... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
45142e2a-c719-4a9f-8747-dfe38b365532 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,182 | supabase-export-v2 | 700eb56c35e74c65 | .. doctest:: :skipif: _tkinter is None
>>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will
>>> # make the turtle move to the clicked point. >>> screen.onclick(None) # remove event binding again | trusted_official_docs | CPython Docs | .. doctest:: :skipif: _tkinter is None
>>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will
>>> # make the turtle move to the clicked point. >>> screen.onclick(None) # remove event binding again | .. doctest:: :skipif: _tkinter is None
>>> screen.onclick(turtle.goto) # Subsequently clicking into the TurtleScreen will
>>> # make the turtle move to the clicked point. >>> screen.onclick(None) # remove event binding again | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
48467924-d63f-4aa0-b7ae-57212d5f9230 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,223 | supabase-export-v2 | a5c5b46d58f3657a | There are four different ways to call this function:
(1) *name* is the name of an image file (PNG, GIF, PGM, and PPM) and *shape* is ``None``: Install the
corresponding image shape. :: | trusted_official_docs | CPython Docs | There are four different ways to call this function:
(1) *name* is the name of an image file (PNG, GIF, PGM, and PPM) and *shape* is ``None``: Install the
corresponding image shape. :: | There are four different ways to call this function:
(1) *name* is the name of an image file (PNG, GIF, PGM, and PPM) and *shape* is ``None``: Install the
corresponding image shape. :: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
49be31b8-ac3e-49ea-9b4d-139a1d3c54bd | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,991 | supabase-export-v2 | 80234ce6468f0dae | a good idea to do this while you're in the middle of doing some complex drawing, because hiding the turtle speeds up the drawing observably.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | a good idea to do this while you're in the middle of doing some complex drawing, because hiding the turtle speeds up the drawing observably.
.. doctest::
:skipif: _tkinter is None | a good idea to do this while you're in the middle of doing some complex drawing, because hiding the turtle speeds up the drawing observably.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4a54cb3f-ce7f-480f-a942-05d4b70db3ab | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,117 | supabase-export-v2 | 6fe958b6ac7c8123 | the background color to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | the background color to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode.
.. doctest::
:skipif: _tkinter is None | the background color to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4c8d0ce2-d4ff-4f1b-b9d5-fed1c1f4d410 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,234 | supabase-export-v2 | c3603aee2dbe35a8 | Add a turtle shape to TurtleScreen's shapelist. Only thusly registered shapes can be used by issuing the command ``shape(shapename)``.
.. versionchanged:: 3.14
Added support for PNG, PGM, and PPM image formats. Both a shape name and an image file name can be specified. | trusted_official_docs | CPython Docs | Add a turtle shape to TurtleScreen's shapelist. Only thusly registered shapes can be used by issuing the command ``shape(shapename)``.
.. versionchanged:: 3.14
Added support for PNG, PGM, and PPM image formats. Both a shape name and an image file name can be specified. | Add a turtle shape to TurtleScreen's shapelist. Only thusly registered shapes can be used by issuing the command ``shape(shapename)``.
.. versionchanged:: 3.14
Added support for PNG, PGM, and PPM image formats. Both a shape name and an image file name can be specified. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4d266712-3bef-4eb2-aa52-754776a1f61e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,292 | supabase-export-v2 | 8dadaa214f197f87 | as a helper class for implementing turtle graphics. May be useful for turtle graphics programs too. Derived from tuple, so a vector is a tuple!
Provides (for *a*, *b* vectors, *k* number): | trusted_official_docs | CPython Docs | as a helper class for implementing turtle graphics. May be useful for turtle graphics programs too. Derived from tuple, so a vector is a tuple!
Provides (for *a*, *b* vectors, *k* number): | as a helper class for implementing turtle graphics. May be useful for turtle graphics programs too. Derived from tuple, so a vector is a tuple!
Provides (for *a*, *b* vectors, *k* number): | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4f405226-254d-49b0-9322-87a3095cdd07 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,206 | supabase-export-v2 | 881432d5148fba23 | ============ ========================= =================== Mode Initial turtle heading positive angles ============ ========================= =================== "standard" to the right (east) counterclockwise "logo" upward (north) clockwise ============ ========================= ===================
.. doctest::
:skip... | trusted_official_docs | CPython Docs | ============ ========================= =================== Mode Initial turtle heading positive angles ============ ========================= =================== "standard" to the right (east) counterclockwise "logo" upward (north) clockwise ============ ========================= ===================
.. doctest::
:skip... | ============ ========================= =================== Mode Initial turtle heading positive angles ============ ========================= =================== "standard" to the right (east) counterclockwise "logo" upward (north) clockwise ============ ========================= ===================
.. doctest::
:skip... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4fcd7cd9-4ec0-4076-a86a-2033e7a1df7e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,775 | supabase-export-v2 | 000413653bd76a0b | units. (Units are by default degrees, but can be set via the :func:`degrees` and :func:`radians` functions.) Angle orientation depends on the turtle mode, see :func:`mode`.
.. doctest::
:skipif: _tkinter is None
:hide: | trusted_official_docs | CPython Docs | units. (Units are by default degrees, but can be set via the :func:`degrees` and :func:`radians` functions.) Angle orientation depends on the turtle mode, see :func:`mode`.
.. doctest::
:skipif: _tkinter is None
:hide: | units. (Units are by default degrees, but can be set via the :func:`degrees` and :func:`radians` functions.) Angle orientation depends on the turtle mode, see :func:`mode`.
.. doctest::
:skipif: _tkinter is None
:hide: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5225860f-68a0-4a8a-86f4-cc8f0010adb6 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,716 | supabase-export-v2 | b4bbe9ce727c2299 | Use the ``turtle`` module namespace -----------------------------------
Using ``from turtle import *`` is convenient - but be warned that it imports a
rather large collection of objects, and if you're doing anything but turtle
graphics you run the risk of a name conflict (this becomes even more an issue
if you're using... | trusted_official_docs | CPython Docs | Use the ``turtle`` module namespace -----------------------------------
Using ``from turtle import *`` is convenient - but be warned that it imports a
rather large collection of objects, and if you're doing anything but turtle
graphics you run the risk of a name conflict (this becomes even more an issue
if you're using... | Use the ``turtle`` module namespace -----------------------------------
Using ``from turtle import *`` is convenient - but be warned that it imports a
rather large collection of objects, and if you're doing anything but turtle
graphics you run the risk of a name conflict (this becomes even more an issue
if you're using... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
52444fa7-a4ea-41fd-a03d-01c4b8a4a65e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,755 | supabase-export-v2 | 0abc0b1141a3a0d7 | Using screen events | :func:`listen` | :func:`onkey` | :func:`onkeyrelease` | :func:`onkeypress` | :func:`onclick` | :func:`onscreenclick` | :func:`ontimer` | :func:`mainloop` | :func:`done`
Settings and special methods
| :func:`mode`
| :func:`colormode`
| :func:`getcanvas`
| :func:`getshapes`
| :func:`register_sh... | trusted_official_docs | CPython Docs | Using screen events | :func:`listen` | :func:`onkey` | :func:`onkeyrelease` | :func:`onkeypress` | :func:`onclick` | :func:`onscreenclick` | :func:`ontimer` | :func:`mainloop` | :func:`done`
Settings and special methods
| :func:`mode`
| :func:`colormode`
| :func:`getcanvas`
| :func:`getshapes`
| :func:`register_sh... | Using screen events | :func:`listen` | :func:`onkey` | :func:`onkeyrelease` | :func:`onkeypress` | :func:`onclick` | :func:`onscreenclick` | :func:`ontimer` | :func:`mainloop` | :func:`done`
Settings and special methods
| :func:`mode`
| :func:`colormode`
| :func:`getcanvas`
| :func:`getshapes`
| :func:`register_sh... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
52686d19-b509-42db-a52d-b3d1b19cd570 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,167 | supabase-export-v2 | e213f1e1a0d7345f | Set focus on TurtleScreen (in order to collect key-events). Dummy arguments are provided in order to be able to pass :func:`listen` to the onclick method.
.. function:: onkey(fun, key)
onkeyrelease(fun, key) | trusted_official_docs | CPython Docs | Set focus on TurtleScreen (in order to collect key-events). Dummy arguments are provided in order to be able to pass :func:`listen` to the onclick method.
.. function:: onkey(fun, key)
onkeyrelease(fun, key) | Set focus on TurtleScreen (in order to collect key-events). Dummy arguments are provided in order to be able to pass :func:`listen` to the onclick method.
.. function:: onkey(fun, key)
onkeyrelease(fun, key) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5356932b-16a0-4894-aae4-0a88c7cca3b0 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,327 | supabase-export-v2 | f81640d1a10a0250 | :param filename: a string, used as filename
Create and write docstring-dictionary to a Python script with the given
filename. This function has to be called explicitly (it is not used by the
turtle graphics classes). The docstring dictionary will be written to the
Python script :file:`{filename}.py`. It is intended ... | trusted_official_docs | CPython Docs | :param filename: a string, used as filename
Create and write docstring-dictionary to a Python script with the given
filename. This function has to be called explicitly (it is not used by the
turtle graphics classes). The docstring dictionary will be written to the
Python script :file:`{filename}.py`. It is intended ... | :param filename: a string, used as filename
Create and write docstring-dictionary to a Python script with the given
filename. This function has to be called explicitly (it is not used by the
turtle graphics classes). The docstring dictionary will be written to the
Python script :file:`{filename}.py`. It is intended ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
539f45ae-e766-4b15-844e-d4b891f580eb | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,974 | supabase-export-v2 | c6d876879379bf4a | Fill the shape drawn after the last call to :func:`begin_fill`.
Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
type of overlap, and number of overlaps. For example, the Turtle star
above may be either all yellow or have some white... | trusted_official_docs | CPython Docs | Fill the shape drawn after the last call to :func:`begin_fill`.
Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
type of overlap, and number of overlaps. For example, the Turtle star
above may be either all yellow or have some white... | Fill the shape drawn after the last call to :func:`begin_fill`.
Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
type of overlap, and number of overlaps. For example, the Turtle star
above may be either all yellow or have some white... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5410dfce-9411-439d-8adf-84997dbe8222 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,116 | supabase-export-v2 | 7297ca189e40c3f0 | *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where colormode is either 1.0 or 255 (see :func:`colormode`).
``bgcolor(r, g, b)``
Set the background color to the RGB color represented by *r*, *g*, and *b*. Each of
*r*, *g*, and *b* must be in the range 0..colormode. | trusted_official_docs | CPython Docs | *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where colormode is either 1.0 or 255 (see :func:`colormode`).
``bgcolor(r, g, b)``
Set the background color to the RGB color represented by *r*, *g*, and *b*. Each of
*r*, *g*, and *b* must be in the range 0..colormode. | *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode, where colormode is either 1.0 or 255 (see :func:`colormode`).
``bgcolor(r, g, b)``
Set the background color to the RGB color represented by *r*, *g*, and *b*. Each of
*r*, *g*, and *b* must be in the range 0..colormode. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
545a5ff2-ff06-4486-ac69-0240662ceacf | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,212 | supabase-export-v2 | d9d0e44df96db40e | .. doctest:: :skipif: _tkinter is None
>>> screen.colormode(1)
>>> turtle.pencolor(240, 160, 80)
Traceback (most recent call last):
... TurtleGraphicsError: bad color sequence: (240, 160, 80)
>>> screen.colormode()
1.0
>>> screen.colormode(255)
>>> screen.colormode()
255
>>> turtle.pencolor(240,160,80) | trusted_official_docs | CPython Docs | .. doctest:: :skipif: _tkinter is None
>>> screen.colormode(1)
>>> turtle.pencolor(240, 160, 80)
Traceback (most recent call last):
... TurtleGraphicsError: bad color sequence: (240, 160, 80)
>>> screen.colormode()
1.0
>>> screen.colormode(255)
>>> screen.colormode()
255
>>> turtle.pencolor(240,160,80) | .. doctest:: :skipif: _tkinter is None
>>> screen.colormode(1)
>>> turtle.pencolor(240, 160, 80)
Traceback (most recent call last):
... TurtleGraphicsError: bad color sequence: (240, 160, 80)
>>> screen.colormode()
1.0
>>> screen.colormode(255)
>>> screen.colormode()
255
>>> turtle.pencolor(240,160,80) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
549420d5-aecd-41c1-866f-6e3e74707d4e | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,919 | supabase-export-v2 | 9bb2bfd5ac487538 | "speed": number in range 0..10 * "resizemode": "auto" or "user" or "noresize" * "stretchfactor": (positive number, positive number) * "outline": positive number * "tilt": number
This dictionary can be used as argument for a subsequent call to :func:`pen`
to restore the former pen-state. Moreover one or more of these a... | trusted_official_docs | CPython Docs | "speed": number in range 0..10 * "resizemode": "auto" or "user" or "noresize" * "stretchfactor": (positive number, positive number) * "outline": positive number * "tilt": number
This dictionary can be used as argument for a subsequent call to :func:`pen`
to restore the former pen-state. Moreover one or more of these a... | "speed": number in range 0..10 * "resizemode": "auto" or "user" or "noresize" * "stretchfactor": (positive number, positive number) * "outline": positive number * "tilt": number
This dictionary can be used as argument for a subsequent call to :func:`pen`
to restore the former pen-state. Moreover one or more of these a... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
54ae58c4-5b41-468e-83fe-fce536736dea | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,913 | supabase-export-v2 | 094f26ec56734733 | "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, the current pensize is returned.
.. doctest::
:skipif: _tkinter is None | trusted_official_docs | CPython Docs | "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, the current pensize is returned.
.. doctest::
:skipif: _tkinter is None | "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, the current pensize is returned.
.. doctest::
:skipif: _tkinter is None | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
54cc8d57-bb81-4813-ac1a-77d8cc60a745 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,944 | supabase-export-v2 | 14e0e5509a2c9e45 | b)`` Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode.
If turtleshape is a polygon, the interior of that polygon is drawn
with the newly set fillcolor. | trusted_official_docs | CPython Docs | b)`` Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode.
If turtleshape is a polygon, the interior of that polygon is drawn
with the newly set fillcolor. | b)`` Set fillcolor to the RGB color represented by *r*, *g*, and *b*. Each of *r*, *g*, and *b* must be in the range 0..colormode.
If turtleshape is a polygon, the interior of that polygon is drawn
with the newly set fillcolor. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
558cf5be-4335-4bd1-8ad3-ecc1ba3f5a0f | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,122 | supabase-export-v2 | 8f15ccd302697a06 | corresponding image as background. If *picname* is ``"nopic"``, delete background image, if present. If *picname* is ``None``, return the filename of the current backgroundimage. ::
>>> screen.bgpic()
'nopic'
>>> screen.bgpic("landscape.gif")
>>> screen.bgpic()
"landscape.gif" | trusted_official_docs | CPython Docs | corresponding image as background. If *picname* is ``"nopic"``, delete background image, if present. If *picname* is ``None``, return the filename of the current backgroundimage. ::
>>> screen.bgpic()
'nopic'
>>> screen.bgpic("landscape.gif")
>>> screen.bgpic()
"landscape.gif" | corresponding image as background. If *picname* is ``"nopic"``, delete background image, if present. If *picname* is ``None``, return the filename of the current backgroundimage. ::
>>> screen.bgpic()
'nopic'
>>> screen.bgpic("landscape.gif")
>>> screen.bgpic()
"landscape.gif" | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5590f733-f30f-49ec-9145-eb00923e3cb0 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 10,921 | supabase-export-v2 | 8b3cf8826364fd85 | .. doctest:: :skipif: _tkinter is None :options: +NORMALIZE_WHITESPACE
>>> turtle.pen(fillcolor="black", pencolor="red", pensize=10)
>>> sorted(turtle.pen().items())
[('fillcolor', 'black'), ('outline', 1), ('pencolor', 'red'),
('pendown', True), ('pensize', 10), ('resizemode', 'noresize'),
('shearfactor', 0.0), ('... | trusted_official_docs | CPython Docs | .. doctest:: :skipif: _tkinter is None :options: +NORMALIZE_WHITESPACE
>>> turtle.pen(fillcolor="black", pencolor="red", pensize=10)
>>> sorted(turtle.pen().items())
[('fillcolor', 'black'), ('outline', 1), ('pencolor', 'red'),
('pendown', True), ('pensize', 10), ('resizemode', 'noresize'),
('shearfactor', 0.0), ('... | .. doctest:: :skipif: _tkinter is None :options: +NORMALIZE_WHITESPACE
>>> turtle.pen(fillcolor="black", pencolor="red", pensize=10)
>>> sorted(turtle.pen().items())
[('fillcolor', 'black'), ('outline', 1), ('pencolor', 'red'),
('pendown', True), ('pensize', 10), ('resizemode', 'noresize'),
('shearfactor', 0.0), ('... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
55a24585-0eeb-49bc-9e8e-570ad098d534 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,100 | supabase-export-v2 | ca1d0afbd8f5c55b | >>> s = Shape("compound") >>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s.addcomponent(poly1, "red", "blue") >>> poly2 = ((0,0),(10,-5),(-10,-5)) >>> s.addcomponent(poly2, "blue", "red")
3. Now add the Shape to the Screen's shapelist and use it: | trusted_official_docs | CPython Docs | >>> s = Shape("compound") >>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s.addcomponent(poly1, "red", "blue") >>> poly2 = ((0,0),(10,-5),(-10,-5)) >>> s.addcomponent(poly2, "blue", "red")
3. Now add the Shape to the Screen's shapelist and use it: | >>> s = Shape("compound") >>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s.addcomponent(poly1, "red", "blue") >>> poly2 = ((0,0),(10,-5),(-10,-5)) >>> s.addcomponent(poly2, "blue", "red")
3. Now add the Shape to the Screen's shapelist and use it: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
568dff61-2c1c-4863-b70e-1744f5db0009 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,086 | supabase-export-v2 | fc09dfb694cfede8 | :param size: an integer or ``None``
Set or disable undobuffer. If *size* is an integer, an empty undobuffer of
given size is installed. *size* gives the maximum number of turtle actions
that can be undone by the :func:`undo` method/function. If *size* is
``None``, the undobuffer is disabled. | trusted_official_docs | CPython Docs | :param size: an integer or ``None``
Set or disable undobuffer. If *size* is an integer, an empty undobuffer of
given size is installed. *size* gives the maximum number of turtle actions
that can be undone by the :func:`undo` method/function. If *size* is
``None``, the undobuffer is disabled. | :param size: an integer or ``None``
Set or disable undobuffer. If *size* is an integer, an empty undobuffer of
given size is installed. *size* gives the maximum number of turtle actions
that can be undone by the :func:`undo` method/function. If *size* is
``None``, the undobuffer is disabled. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5980ef95-3edb-4270-8a90-75b1e380edf5 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,198 | supabase-export-v2 | b0b23b48df45151d | :param title: string :param prompt: string :param default: number (optional) :param minval: number (optional) :param maxval: number (optional)
Pop up a dialog window for input of a number. title is the title of the
dialog window, prompt is a text mostly describing what numerical information
to input. default: default... | trusted_official_docs | CPython Docs | :param title: string :param prompt: string :param default: number (optional) :param minval: number (optional) :param maxval: number (optional)
Pop up a dialog window for input of a number. title is the title of the
dialog window, prompt is a text mostly describing what numerical information
to input. default: default... | :param title: string :param prompt: string :param default: number (optional) :param minval: number (optional) :param maxval: number (optional)
Pop up a dialog window for input of a number. title is the title of the
dialog window, prompt is a text mostly describing what numerical information
to input. default: default... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
59f26d7a-93fd-4c79-9730-cc8fb4bb6ba4 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,363 | supabase-export-v2 | 1c8ef0f139887ddf | :func:`Screen.mainloop <mainloop>` has been added, so there is no longer a need to use the standalone :func:`mainloop` function when working with :class:`Screen` and :class:`Turtle` objects.
- Two input methods have been added: :func:`Screen.textinput <textinput>` and
:func:`Screen.numinput <numinput>`. These pop up i... | trusted_official_docs | CPython Docs | :func:`Screen.mainloop <mainloop>` has been added, so there is no longer a need to use the standalone :func:`mainloop` function when working with :class:`Screen` and :class:`Turtle` objects.
- Two input methods have been added: :func:`Screen.textinput <textinput>` and
:func:`Screen.numinput <numinput>`. These pop up i... | :func:`Screen.mainloop <mainloop>` has been added, so there is no longer a need to use the standalone :func:`mainloop` function when working with :class:`Screen` and :class:`Turtle` objects.
- Two input methods have been added: :func:`Screen.textinput <textinput>` and
:func:`Screen.numinput <numinput>`. These pop up i... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5ca13ae8-b8e9-4ff4-95b0-d9b1320057c7 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,043 | supabase-export-v2 | c6cdb6bd1254aada | .. function:: onclick(fun, btn=1, add=None) :noindex:
:param fun: a function with two arguments which will be called with the
coordinates of the clicked point on the canvas
:param btn: number of the mouse-button, defaults to 1 (left mouse button)
:param add: ``True`` or ``False`` -- if ``True``, a new binding will b... | trusted_official_docs | CPython Docs | .. function:: onclick(fun, btn=1, add=None) :noindex:
:param fun: a function with two arguments which will be called with the
coordinates of the clicked point on the canvas
:param btn: number of the mouse-button, defaults to 1 (left mouse button)
:param add: ``True`` or ``False`` -- if ``True``, a new binding will b... | .. function:: onclick(fun, btn=1, add=None) :noindex:
:param fun: a function with two arguments which will be called with the
coordinates of the clicked point on the canvas
:param btn: number of the mouse-button, defaults to 1 (left mouse button)
:param add: ``True`` or ``False`` -- if ``True``, a new binding will b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5cb98b48-ba58-4a4a-9297-5f7a1a529e34 | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,126 | supabase-export-v2 | 8acd3edd71ed23b8 | .. function:: clearscreen()
Delete all drawings and all turtles from the TurtleScreen. Reset the now
empty TurtleScreen to its initial state: white background, no background
image, no event bindings and tracing on. | trusted_official_docs | CPython Docs | .. function:: clearscreen()
Delete all drawings and all turtles from the TurtleScreen. Reset the now
empty TurtleScreen to its initial state: white background, no background
image, no event bindings and tracing on. | .. function:: clearscreen()
Delete all drawings and all turtles from the TurtleScreen. Reset the now
empty TurtleScreen to its initial state: white background, no background
image, no event bindings and tracing on. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d4a46c2-d979-4f1d-ac84-fab0f53ce0bf | CPython Docs | file://datasets/cpython/Doc/library/turtle.rst | unknown | 47e0c155-07cf-49ab-a88c-3efc4cddf397 | 11,357 | supabase-export-v2 | 1dbea5dd2d96697c | of :class:`Screen`. The functions derived from these remain available. (In fact already in Python 2.6 these methods were merely duplications of the corresponding :class:`TurtleScreen`/:class:`Screen` methods.)
- The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:`begin_fill` and :func:`end_fill... | trusted_official_docs | CPython Docs | of :class:`Screen`. The functions derived from these remain available. (In fact already in Python 2.6 these methods were merely duplications of the corresponding :class:`TurtleScreen`/:class:`Screen` methods.)
- The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:`begin_fill` and :func:`end_fill... | of :class:`Screen`. The functions derived from these remain available. (In fact already in Python 2.6 these methods were merely duplications of the corresponding :class:`TurtleScreen`/:class:`Screen` methods.)
- The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:`begin_fill` and :func:`end_fill... | 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.