Search
Searching for multiple words only shows matches that contain all words.
Search Results
Search finished, found 155 pages matching the search query.
- PyConfig.prefix (C member, in Python Initialization Configuration)
- sys.prefix (Python data, in
sys
— System-specific parameters and functions) - xml.dom.Attr.prefix (Python attribute, in
xml.dom
— The Document Object Model API) - xml.dom.Node.prefix (Python attribute, in
xml.dom
— The Document Object Model API) - zipimport.zipimporter.prefix (Python attribute, in
zipimport
— Import modules from Zip archives) argparse
— Parser for command-line options, arguments and subcommands...rgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=argparse.HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbr...
ipaddress
— IPv4/IPv6 manipulation library...e now parsed as strict as glibc inet_pton(). version The appropriate version number: 4 for IPv4, 6 for IPv6. max_prefixlen The total number of bits in the address representation for this version: 32 for IPv4, 128 for IPv6. The prefix...
sysconfig
— Provide access to Python’s configuration information...emes are used by package installers to determine where to copy files to. Python currently supports nine schemes: posix_prefix: scheme for POSIX platforms like Linux or macOS. This is the default scheme used when Python or a component is i...
- What’s New In Python 3.9
...ctions; PEP 614, relaxed grammar restrictions on decorators. New built-in features: PEP 616, string methods to remove prefixes and suffixes. New features in the standard library: PEP 593, flexible function and variable annotations; os.p...
- --exec-prefix (program option, in 3. Configure Python)
- --prefix (program option, in 3. Configure Python)
- bytearray.removeprefix (Python method, in Built-in Types)
- bytes.removeprefix (Python method, in Built-in Types)
- ipaddress.IPv4Address.max_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv4Interface.with_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv4Network.max_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv4Network.prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv4Network.with_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv6Address.max_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv6Interface.with_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv6Network.max_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv6Network.prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - ipaddress.IPv6Network.with_prefixlen (Python attribute, in
ipaddress
— IPv4/IPv6 manipulation library) - msvcrt.LIBRARIES_ASSEMBLY_NAME_PREFIX (Python data, in
msvcrt
— Useful routines from the MS VC++ runtime) - os.path.commonprefix (Python function, in
os.path
— Common pathname manipulations) - Py_GetExecPrefix (C function, in Initialization, Finalization, and Threads)
- Py_GetPrefix (C function, in Initialization, Finalization, and Threads)
- PyConfig.base_exec_prefix (C member, in Python Initialization Configuration)
- PyConfig.base_prefix (C member, in Python Initialization Configuration)
- PyConfig.exec_prefix (C member, in Python Initialization Configuration)
- PyConfig.pycache_prefix (C member, in Python Initialization Configuration)
- PYTHONPYCACHEPREFIX (environment variable, in 1. Command line and environment)
- site.PREFIXES (Python data, in
site
— Site-specific configuration hook) - str.removeprefix (Python method, in Built-in Types)
- sys.base_exec_prefix (Python data, in
sys
— System-specific parameters and functions) - sys.base_prefix (Python data, in
sys
— System-specific parameters and functions) - sys.exec_prefix (Python data, in
sys
— System-specific parameters and functions) - sys.pycache_prefix (Python data, in
sys
— System-specific parameters and functions) - tempfile.gettempprefix (Python function, in
tempfile
— Generate temporary files and directories) - tempfile.gettempprefixb (Python function, in
tempfile
— Generate temporary files and directories) - unittest.TestLoader.testMethodPrefix (Python attribute, in
unittest
— Unit testing framework) - xml.parsers.expat.errors.XML_ERROR_RESERVED_PREFIX_XML (Python data, in
xml.parsers.expat
— Fast XML parsing using Expat) - xml.parsers.expat.errors.XML_ERROR_RESERVED_PREFIX_XMLNS (Python data, in
xml.parsers.expat
— Fast XML parsing using Expat) - xml.parsers.expat.errors.XML_ERROR_UNBOUND_PREFIX (Python data, in
xml.parsers.expat
— Fast XML parsing using Expat) - xml.parsers.expat.errors.XML_ERROR_UNDECLARING_PREFIX (Python data, in
xml.parsers.expat
— Fast XML parsing using Expat) - xml.sax.handler.ContentHandler.endPrefixMapping (Python method, in
xml.sax.handler
— Base classes for SAX handlers) - xml.sax.handler.ContentHandler.startPrefixMapping (Python method, in
xml.sax.handler
— Base classes for SAX handlers) - xml.sax.handler.feature_namespace_prefixes (Python data, in
xml.sax.handler
— Base classes for SAX handlers) argparse
— Parser for command-line options, arguments and subcommands > prefix_charsprefix_chars Most command-line options will use - as the prefix, e.g. -f/--foo. Parsers that need to support different or additional prefix characters, e.g. for options like +f or /foo, may specify them using the prefix_chars= argument to...
sysconfig
— Provide access to Python’s configuration information > posix_prefixposix_prefix Path Installation directory stdlib prefix/lib/pythonX.Y platstdlib prefix/lib/pythonX.Y platlib prefix/lib/pythonX.Y/site-packages purelib prefix/lib/pythonX.Y/site-packages include prefix/include/pythonX.Y platinclu...
unittest.mock
— mock object library > TEST_PREFIXTEST_PREFIX All of the patchers can be used as class decorators. When used in this way they wrap every test method on the class. The patchers recognise methods that start with 'test' as being test methods. This is the same way that the uni...
cmd
— Support for line-oriented command interpreters...instance has the following methods: Cmd.cmdloop(intro=None) Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument. The o...
codeop
— Compile Python code...e code object will be filename, which defaults to '<input>'. Returns None if source is not valid Python code, but is a prefix of valid Python code. If there is a problem with source, an exception will be raised. SyntaxError is raised if th...
compileall
— Byte-compile Python libraries...d other messages in cases where the source file does not exist at the time the byte-code file is executed. -s strip_prefix -p prepend_prefix Remove (-s) or append (-p) the given prefix of paths recorded in the .pyc files. Cannot be...
configparser
— Configuration file parser...hon programs which can be customized by end users easily. Note This library does not interpret or write the value-type prefixes used in the Windows Registry extended version of INI syntax. See also Module tomllibTOML is a well-specified...
csv
— CSV File Reading and Writing...side a field should themselves be quoted. When True, the character is doubled. When False, the escapechar is used as a prefix to the quotechar. It defaults to True. On output, if doublequote is False and no escapechar is set, Error is rai...
ctypes
— A foreign function library for Python...ad. ctypes.util.find_library(name) Try to find a library and return a pathname. name is the library name without any prefix like lib, suffix like .so, .dylib or version number (this is the form used for the posix linker option -l). If n...
curses
— Terminal handling for character-cell displays...responding printable ASCII character. The name of an alt-key combination (128–255) is a bytes object consisting of the prefix b'M-' followed by the name of the corresponding ASCII character. curses.killchar() Return the user’s current...
decimal
— Decimal fixed-point and floating-point arithmetic...min_mag(x, y) Compares the values numerically with their sign ignored. minus(x) Minus corresponds to the unary prefix minus operator in Python. multiply(x, y) Return the product of x and y. next_minus(x) Returns the largest...
difflib
— Helpers for computing deltas...oduced by Differ.compare() or ndiff(), extract lines originating from file 1 or 2 (parameter which), stripping off line prefixes. Example: >>> diff = ndiff('one\ntwo\nthree\n'.splitlines(keepends=True), ... 'ore\ntree\nemu\n'.s...
dis
— Disassembler for Python bytecode...dex of operation within bytecode sequence start_offset start index of operation within bytecode sequence, including prefixed EXTENDED_ARG operations if present; otherwise equal to offset cache_offset start index of the cache entries...
email.headerregistry
: Custom Header Objects...r version number as an integer class email.headerregistry.ParameterizedMIMEHeader MIME headers all start with the prefix ‘Content-’. Each specific header has a certain value, described under the class for that header. Some can also...
getopt
— C-style parser for command line options...ons, shortopts should be an empty string. Long options on the command line can be recognized so long as they provide a prefix of the option name that matches exactly one of the accepted options. For example, if longopts is ['foo', 'frob']...
gettext
— Multilingual internationalization services...gettext.dnpgettext(domain, context, singular, plural, n) Similar to the corresponding functions without the p in the prefix (that is, gettext(), dgettext(), ngettext(), dngettext()), but the translation is restricted to the given message...
hashlib
— Secure hashes and message digests...len(h.digest()) 20 Hash objects with different digest sizes have completely different outputs (shorter hashes are not prefixes of longer hashes); BLAKE2b and BLAKE2s produce different outputs even if the output length is the same: >>> fro...
http.cookiejar
— Cookie handling for HTTP clients...mainStrictNonDomain means both flags are set). DefaultCookiePolicy.DomainStrictNoDots When setting cookies, the ‘host prefix’ must not contain a dot (eg. www.foo.bar.com can’t set a cookie for .bar.com, because www.foo contains a dot)....
http.server
— HTTP servers...arguments to log_message() are applied as inputs to the formatting. The client ip address and current date and time are prefixed to every message logged. version_string() Returns the server software’s version string. This is a combinati...
logging.config
— Logging configuration...xample, a subclass of DictConfigurator could call DictConfigurator.__init__() in its own __init__(), then set up custom prefixes which would be usable in the subsequent configure() call. dictConfigClass would be bound to this new subclass,...
logging.handlers
— Logging handlers...t (socket.SOCK_STREAM). makePickle(record) Pickles the record’s attribute dictionary in binary format with a length prefix, and returns it ready for transmission across the socket. The details of this operation are equivalent to: data =...
msvcrt
— Useful routines from the MS VC++ runtime...LY_PUBLICKEYTOKEN The VC Assembly public key token, from the crtassem.h header file. msvcrt.LIBRARIES_ASSEMBLY_NAME_PREFIX The Libraries Assembly name prefix, from the crtassem.h header file.
os.path
— Common pathname manipulations...ths contain both absolute and relative pathnames, if paths are on different drives, or if paths is empty. Unlike commonprefix(), this returns a valid path. Added in version 3.5. Changed in version 3.6: Accepts a sequence of path-like ob...
os
— Miscellaneous operating system interfaces...hen operate on the file referred to by the descriptor. (For POSIX systems, Python will call the variant of the function prefixed with f (e.g. call fchdir instead of chdir).) You can check whether or not path can be specified as a file descr...
pathlib
— Object-oriented filesystem paths...) don’t include trailing slashes. The values returned from pathlib’s path.glob() and path.rglob() include the path as a prefix, unlike the results of glob.glob(root_dir=path). The values returned from pathlib’s path.glob() and path.rglob()...
pdb
— The Python Debugger...d to be Python statements and are executed in the context of the program being debugged. Python statements can also be prefixed with an exclamation point (!). This is a powerful way to inspect the program being debugged; it is even possib...
pkgutil
— Package extension utility...on importlib rather than relying on the package internal PEP 302 import emulation. pkgutil.iter_modules(path=None, prefix='') Yields ModuleInfo for all submodules on path, or, if path is None, all top-level modules on sys.path. path sh...
pyclbr
— Python module browser support...r nested functions and classes. Added in version 3.7. is_async True for functions that are defined with the async prefix, False otherwise. Added in version 3.10. Class Objects class pyclbr.Class Class Class instances describ...
re
— Regular expression operations...raw string notation for regular expression patterns; backslashes are not handled in any special way in a string literal prefixed with 'r'. So r"\n" is a two-character string containing '\' and 'n', while "\n" is a one-character string cont...
shutil
— High-level file operations...before creating the archive. base_dir is the directory where we start archiving from; i.e. base_dir will be the common prefix of all files and directories in the archive. base_dir must be given relative to root_dir. See Archiving example...
site
— Site-specific configuration hook...using -S. It starts by constructing up to four directories from a head and a tail part. For the head part, it uses sys.prefix and sys.exec_prefix; empty heads are skipped. For the tail part, it uses the empty string and then lib/site-pack...
string
— Common string operations...oat and complex types. For integers, when binary, octal, or hexadecimal output is used, this option adds the respective prefix '0b', '0o', '0x', or '0X' to the output value. For float and complex the alternate form causes the result of the...
struct
— Interpret bytes as packed binary data...sources (files or network connections), or data transfer between the Python application and the C layer. Note When no prefix character is given, native mode is the default. It packs or unpacks data based on the platform and compiler on wh...
sys
— System-specific parameters and functions...d when possible. See the audit events table for all events raised by CPython. Added in version 3.8. sys.base_exec_prefix Set during Python startup, before site.py is run, to the same value as exec_prefix. If not running in a virtual e...
tempfile
— Generate temporary files and directories...owing user-callable items: tempfile.TemporaryFile(mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None) Return a file-like object that can be used as a temporary storage area. The file...
test
— Regression tests package for Python...ng into sys.__stderr__. Format the message as: f"Warning -- {msg}". If msg is made of multiple lines, add "Warning -- " prefix to each line. Added in version 3.9. test.support.wait_process(pid, *, exitcode, timeout=None) Wait until pr...
textwrap
— Text wrapping and filling...ints ' hello\n world\n ' print(repr(dedent(s))) # prints 'hello\n world\n' textwrap.indent(text, prefix, predicate=None) Add prefix to the beginning of selected lines in text. Lines are separated by calling text.split...
tkinter.ttk
— Tk themed widgets...display format invalid The widget’s value is invalid A state specification is a sequence of state names, optionally prefixed with an exclamation point indicating that the bit is off. ttk.Widget Besides the methods described below, the...
tkinter
— Python interface to Tcl/Tk...160 of Ousterhout’s book for details. cursorThe standard X cursor names from cursorfont.h can be used, without the XC_ prefix. For example to get a hand cursor (XC_hand2), use the string "hand2". You can also specify a bitmap and mask fi...
trace
— Trace or track Python statement execution...end to make several runs with --count, and then produce a single set of annotated listings at the end. -g, --timing Prefix each line with the time since the program started. Only used while tracing. Filters These options may be rep...
unittest.mock
— mock object library...r test methods share a common patchings set. patch() finds tests by looking for method names that start with patch.TEST_PREFIX. By default this is 'test', which matches the way unittest finds tests. You can specify an alternative prefix by...
unittest
— Unit testing framework...following attributes of a TestLoader can be configured either by subclassing or assignment on an instance: testMethodPrefix String giving the prefix of method names which will be interpreted as test methods. The default value is 'test'....
urllib.request
— Extensible library for opening URLs...This function uses quote() function to encode the path. For historical reasons, the return value omits the file: scheme prefix. This example shows the function being used on Windows: >>> from urllib.request import pathname2url >>> path = 'C...
uuid
— UUID objects according to RFC 4122...or a single 128-bit integer as the int argument. When a string of hex digits is given, curly braces, hyphens, and a URN prefix are all optional. For example, these expressions all yield the same UUID: UUID('{12345678-1234-5678-1234-5678123...
venv
— Creation of virtual environments...environment (pip is bootstrapped by default) --prompt PROMPT Provides an alternative prompt prefix for this environment. --upgrade-deps Upgrade core dependencies (pip) to the late...
warnings
— Warning control...what is possible. Available Functions warnings.warn(message, category=None, stacklevel=1, source=None, *, skip_file_prefixes=()) Issue a warning, or maybe ignore it or raise an exception. The category argument, if given, must be a warn...
xml.dom
— The Document Object Model API...URI parameter to a namespaces-specific method. xml.dom.XML_NAMESPACE The namespace URI associated with the reserved prefix xml, as defined by Namespaces in XML (section 4). xml.dom.XMLNS_NAMESPACE The namespace URI for namespace dec...
xml.etree.ElementTree
— The ElementTree XML API...p(a) <a><b /><c><d /></c></a> Parsing XML with Namespaces If the XML input has namespaces, tags and attributes with prefixes in the form prefix:sometag get expanded to {uri}sometag where the prefix is replaced by the full URI. Also, if...
xml.parsers.expat
— Fast XML parsing using Expat...strings if given. If the public identifier is omitted, publicId will be None. xmlparser.StartNamespaceDeclHandler(prefix, uri) Called when an element contains a namespace declaration. Namespace declarations are processed before the S...
xml.sax.handler
— Base classes for SAX handlers...amespaces" true: Perform Namespace processing. false: Optionally do not perform Namespace processing (implies namespace-prefixes; default). access: (parsing) read-only; (not parsing) read/write xml.sax.handler.feature_namespace_prefixe...
xmlrpc.client
— XML-RPC client access...erProxy. Changed in version 3.5: Added the context argument. Changed in version 3.6: Added support of type tags with prefixes (e.g. ex:nil). Added support of unmarshalling additional types used by Apache XML-RPC implementation for numeri...
zipimport
— Import modules from Zip archives...dded in version 3.10. archive The file name of the importer’s associated ZIP file, without a possible subpath. prefix The subpath within the ZIP file where modules are searched. This is the empty string for zipimporter objects whi...
zlib
— Compression compatible with gzip...s a copy of the compression object. This can be used to efficiently compress a set of data that share a common initial prefix. Changed in version 3.8: Added copy.copy() and copy.deepcopy() support to compression objects. Decompression...
- 1. Command line and environment
...-8 Mode (even when it would otherwise activate automatically). See also PYTHONUTF8. Added in version 3.7. -X pycache_prefix=PATH enables writing .pyc files to a parallel tree rooted at the given directory instead of to the code tree. See...
- 1. Extending Python with C or C++
...tibility. See Strings and buffers for a description of this macro. All user-visible symbols defined by Python.h have a prefix of Py or PY, except those defined in standard header files. For convenience, and since they are used extensively...
- 10. Full Grammar specification
...10. Full Grammar specification This is the full Python grammar, derived directly from the grammar used to generate the CPython parser (see Grammar/python.gram). The version here omits details related to code generation and
- 2. Lexical analysis
...tring and Bytes literals String literals are described by the following lexical definitions: stringliteral ::= [stringprefix](shortstring | longstring) stringprefix ::= "r" | "u" | "R" | "U" | "f" | "F" | "fr" | "Fr...
- 2. Using Python on Unix platforms
...uerade the python3 binary. make altinstall is therefore recommended instead of make install since it only installs exec_prefix/bin/pythonversion. 2.3. Python-related paths and files These are subject to difference depending on local inst...
- 3. An Informal Introduction to Python
...heses to have them joined together.' This only works with two literals though, not with variables or expressions: >>> prefix = 'Py' >>> prefix 'thon' # can't concatenate a variable and a string literal File "<stdin>", line 1 prefix...
- 3. Configure Python
...--enable-wasm-pthreads Turn on pthreads support for WASM. Added in version 3.11. 3.3.6. Install Options --prefix=PREFIX Install architecture-independent files in PREFIX. On Unix, it defaults to /usr/local. This value can be re...
- 4. Using Python on Windows
...om any. The Company is matched on the full string, case-insensitive. The Tag is matched on either the full string, or a prefix, provided the next character is a dot or a hyphen. This allows -V:3.1 to match 3.1-32, but not 3.10. Tags are sor...
- 5. Using Python on macOS
...:3a83b172af, Jun 5 2024, 12:50:24) [Clang 15.0.0 (clang-1500.3.9.4)] $ # test that they are also available without the prefix if /usr/local/bin is on $PATH $ python3.13t -VV Python 3.13.0b2 experimental free-threading build (v3.13.0b2:3a83...
- 6. Modules
...k', '_getframe', '_git', '_home', '_xoptions', 'abiflags', 'addaudithook', 'api_version', 'argv', 'audit', 'base_exec_prefix', 'base_prefix', 'breakpointhook', 'builtin_module_names', 'byteorder', 'call_tracing', 'callstats', 'copyright...
- 6. Using Python on Android
...file to copy the following items into your project. All except your own Python code can be copied from cross-build/HOST/prefix/lib: In your JNI libraries: libpython*.*.so lib*_python.so (external libraries such as OpenSSL) In your asset...
- 7. Input and Output
...ed string literals (also called f-strings for short) let you include the value of Python expressions inside a string by prefixing the string with f or F and writing expressions as {expression}. An optional format specifier can follow the ex...
- 7. Simple statements
...comma, optionally in parentheses, the object is assigned to that target. Else: If the target list contains one target prefixed with an asterisk, called a “starred” target: The object must be an iterable with at least as many items as ther...
- 8. Compound statements
...ame (e.g., T). Semantically, this represents a single type to a type checker. typing.TypeVarTuple, introduced by a name prefixed with a single asterisk (e.g., *Ts). Semantically, this stands for a tuple of any number of types. typing.ParamS...
- 9. Classes
...; for instance, two different modules may both define a function maximize without confusion — users of the modules must prefix it with the module name. By the way, I use the word attribute for any name following a dot — for example, in the...
- An introduction to the ipaddress module
...e of host addresses that are part of that network. The simplest form for that information is a “network address/network prefix” pair, where the prefix defines the number of leading bits that are compared to determine whether or not an addre...
- Argparse Tutorial
...stom action class with the action parameter instead. For example, let’s say you want to handle arguments with different prefixes and process them accordingly: import argparse parser = argparse.ArgumentParser(prefix_chars='-+') parser.add_...
- Built-in Exceptions
...This is 1-indexed: the first character in the line has an offset of 1. For errors in f-string fields, the message is prefixed by “f-string: ” and the offsets are offsets in a text constructed from the replacement expression. For example...
- Built-in Functions
...erates a string similar to that returned by repr() in Python 2. bin(x) Convert an integer number to a binary string prefixed with “0b”. The result is a valid Python expression. If x is not a Python int object, it has to define an __inde...
- Built-in Types
...h.floor() and math.ceil() for alternative conversions. float also accepts the strings “nan” and “inf” with an optional prefix “+” or “-” for Not a Number (NaN) and positive or negative infinity. Python defines pow(0, 0) and 0 ** 0 to be 1,...
- C API Stability
...expectations: Unstable API, may change in minor versions without a deprecation period. It is marked by the PyUnstable prefix in names. Limited API, is compatible across several minor releases. When Py_LIMITED_API is defined, only this sub...
- Changelog
...using environment variables. Patch by Andrey Efremov. Tools/Demos gh-129248: The iOS test runner now strips the log prefix from each line output by the test suite. gh-128152: Fix a bug where Argument Clinic’s C pre-processor parser trie...
- Common Object Structures
...hanged in version 3.12: The READONLY macro was renamed to Py_READONLY. The PY_AUDIT_READ macro was renamed with the Py_ prefix. The new names are now always available. Previously, these required #include "structmember.h". The header is stil...
- Deprecations
...thon initialization functions: PySys_ResetWarnOptions(): Clear sys.warnoptions and warnings.filters instead. Py_GetExecPrefix(): Get sys.base_exec_prefix and sys.exec_prefix instead. Py_GetPath(): Get sys.path instead. Py_GetPrefix(): Get...
- Design and History FAQ
...look up the class definition to be sure. Some C++ and Java coding standards call for instance attributes to have an m_ prefix, so this explicitness is still useful in those languages, too. Second, it means that no special syntax is necessa...
- Glossary
...module written in C or C++, using Python’s C API to interact with the core and with user code. f-stringString literals prefixed with 'f' or 'F' are commonly called “f-strings” which is short for formatted string literals. See also PEP 498...
- IDLE — Python editor and shell
...allowing selection of existing names. See Completions in the Editing and navigation section below. Expand WordExpand a prefix you have typed to match a full word in the same window; repeat to get a different expansion. Show Call TipAfter...
- Initialization, Finalization, and Threads
...wing functions should not be called before the interpreter has been initialized: Py_EncodeLocale(), Py_GetPath(), Py_GetPrefix(), Py_GetExecPrefix(), Py_GetProgramFullPath(), Py_GetPythonHome(), Py_GetProgramName(), PyEval_InitThreads(), an...
- Internet Protocols and Support
...jects Conversion to Strings and Integers Operators Comparison operators Arithmetic operators IP Network definitions Prefix, net mask and host mask Network objects Operators Logical operators Iteration Networks as containers of addresses...
- Introduction
...ro. All user visible names defined by Python.h (except those defined by the included standard headers) have one of the prefixes Py or _Py. Names beginning with _Py are for internal use by the Python implementation and should not be used b...
- Migrating
optparse
code toargparse
...by the optparse module, including: Handling positional arguments. Supporting subcommands. Allowing alternative option prefixes like + and /. Handling zero-or-more and one-or-more style arguments. Producing more informative usage messages....
- Number Protocol
...base base as a string. The base argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned string is prefixed with a base marker of '0b', '0o', or '0x', respectively. If n is not a Python int, it is converted with PyNumb...
- Pending Removal in Python 3.15
...thon initialization functions: PySys_ResetWarnOptions(): Clear sys.warnoptions and warnings.filters instead. Py_GetExecPrefix(): Get sys.base_exec_prefix and sys.exec_prefix instead. Py_GetPath(): Get sys.path instead. Py_GetPrefix(): Get...
- Python Documentation contents
...check for DeprecationWarning in your code New Features Dictionary Merge & Update Operators New String Methods to Remove Prefixes and Suffixes Type Hinting Generics in Standard Collections New Parser Other Language Changes New Modules zone...
- Python Initialization Configuration
...nvironment variable. Default: 0 in Python config, 1 in isolated config. Added in version 3.11. wchar_t *base_exec_prefix sys.base_exec_prefix. Default: NULL. Part of the Python Path Configuration output. See also PyConfig.exec_prefix....
- Python Runtime Services
...Configuration variables Installation paths User scheme posix_user nt_user osx_framework_user Home scheme posix_home Prefix scheme posix_prefix nt Installation path functions Other functions Using sysconfig as a script builtins — Bui...
- Regular Expression HOWTO
...ython’s raw string notation for regular expressions; backslashes are not handled in any special way in a string literal prefixed with 'r', so r"\n" is a two-character string containing '\' and 'n', while "\n" is a one-character string conta...
- Socket Programming HOWTO
...may end up reading the start of a following message. You’ll need to put that aside and hold onto it, until it’s needed. Prefixing the message with its length (say, as 5 numeric characters) gets more complex, because (believe it or not), you...
- The initialization of the
sys.path
module search path...files on Windows and .so files on other platforms. The directory with the platform-independent Python modules is called prefix. The directory with the extension modules is called exec_prefix. The PYTHONHOME environment variable may be used...
- Type Objects
...ld be initially set to NULL and treated as read-only. []: Names in square brackets are for internal use only. <R> (as a prefix) means the field is required (must be non-NULL). [2] Columns: “O”: set on PyBaseObject_Type “T”: set on PyTyp...
- Type Objects
...the structures PyTypeObject, PyNumberMethods, PySequenceMethods, PyMappingMethods and PyAsyncMethods with an added Py_ prefix. For example, use: Py_tp_dealloc to set PyTypeObject.tp_dealloc Py_nb_add to set PyNumberMethods.nb_add Py_sq_le...
- Unicode Objects and Codecs
...rt of the Stable ABI.Return 1 if substr matches unicode[start:end] at the given tail end (direction == -1 means to do a prefix match, direction == 1 a suffix match), 0 otherwise. Return -1 if an error occurred. Py_ssize_t PyUnicode_Find...
- What’s New in Python 2.3
...t.py script now provides a way to allow “all resources except foo.” A resource name passed to the -u option can now be prefixed with a hyphen ('-') to mean “remove this resource.” For example, the option ‘-uall,-bsddb’ could be used to en...
- What’s New in Python 2.6
...i. PEP 3127: Integer Literal Support and Syntax Python 3.0 changes the syntax for octal (base-8) integer literals, prefixing them with “0o” or “0O” instead of a leading zero, and adds support for binary (base-2) integer literals, signa...
- What’s New in Python 2.7
...ting XML. You can set the default namespace for a tree by setting the default_namespace attribute and can register new prefixes with register_namespace(). In XML mode, you can use the true/false xml_declaration parameter to suppress the X...
- What’s New In Python 3.10
...especially when forward references or invalid types were involved. Compare: StrCache = 'Cache[str]' # a type alias LOG_PREFIX = 'LOG[DEBUG]' # a module constant Now the typing module has a special value TypeAlias which lets you declare...
- What’s New In Python 3.12
...ka gh-86388.) argparse.ArgumentParser changed encoding and error handler for reading arguments from file (e.g. fromfile_prefix_chars option) from default text encoding (e.g. locale.getpreferredencoding(False)) to filesystem encoding and err...
- What’s New In Python 3.13
...tions [exc_number] command for Pdb. (Contributed by Matthias Bussonnier in gh-106676.) Expressions and statements whose prefix is a pdb command are now correctly identified and executed. (Contributed by Tian Gao in gh-108464.) queue Add...
- What’s New In Python 3.2
...ties for the format character #. Previously, for integers in binary, octal, or hexadecimal, it caused the output to be prefixed with ‘0b’, ‘0o’, or ‘0x’ respectively. Now it can also handle floats, complex, and Decimal, causing the output...
- What’s New In Python 3.3
...style arrays is explained. Features All native single character format specifiers in struct module syntax (optionally prefixed with ‘@’) are now supported. With some restrictions, the cast() method allows changing of format and shape of C...
- What’s New In Python 3.5
...email A new policy option Policy.mangle_from_ controls whether or not lines that start with "From " in email bodies are prefixed with a ">" character by generators. The default is True for compat32 and False for all other policies. (Contri...
- What’s New In Python 3.6
...EP 498 introduces a new kind of string literals: f-strings, or formatted string literals. Formatted string literals are prefixed with 'f' and are similar to the format strings accepted by str.format(). They contain replacement fields surro...
- What’s New In Python 3.8
...ontributed by Pablo Galindo in bpo-36540.) Parallel filesystem cache for compiled bytecode files The new PYTHONPYCACHEPREFIX setting (also available as -X pycache_prefix) configures the implicit bytecode cache to use a separate parallel f...
- 3. Configure Python
--prefix=PREFIX