The Python Tutorial — Python 3.15.2 documentation
This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally ...
This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are additionally ...
| 1. Whetting Your Appetite¶. If you do much work on computers, eventually you find that there’s some task you’d like to automate. For example, you may wish to perform a search-and-replace over a large number of text files, or rename and rearrange a bunch of photo files in a complicated way.
Dec 12, 2010 ... This page contains tutorial information. For links to reference information and a logging cookbook, please see Other resources.
| Command-line introspection tools¶. Source code: Lib/asyncio/tools.py. The asyncio module can be invoked as a script via python -m asyncio to inspect the task graph of another running Python process without modifying it or restarting it. The asyncio.tools submodule implements this interface.
... while automatically managing the event loop. ... getcwdb() function now uses the UTF-8 encoding on Windows, rather than the ANSI code page: see PEP 529 for the ...
While in most uses, you will only embed a single Python interpreter, there are cases where you need to create several independent interpreters in the same process and perhaps even in the same thread.
Source code: Lib/turtle.py Turtle star: Turtle can draw intricate shapes using programs that repeat simple moves. A yellow starburst of thin spikes with a ...
For example, the length of word[1:3] is 2. Attempting to use an index that is too large will result in an errorThe while loop executes as long as the condition (here: a < 10) remains true. In Python, like in C, any non-zero integer value is true; zero is false.
Source code: Lib/pdb.py The module pdb defines an interactive source code debugger for Python programs. It supports setting (conditional) breakpoints and ...
An event loop policy is a global object used to get and set the current event loop, as well as create new event loops. The default policy can be replaced with built-in alternatives to use different event loop implementations, or substituted by a custom policy that can override these behaviors.
If no script name was passed to the Python interpreter, argv[0] is the empty string. To loop over the standard input, or the list of files given on the command ...
Symbols · comment, [1], [2] · in doctests · in printf-style formatting, [1] · in regular expressions · in string formatting · source encoding declaration.