Home
last modified time | relevance | path

Searched +full:python +full:- +full:format (Results 1 – 25 of 1034) sorted by relevance

12345678910>>...42

/third_party/python/Doc/c-api/
Darg.rst3 .. _arg-parsing:
10 :ref:`extending-index`.
13 :c:func:`PyArg_ParseTupleAndKeywords`, and :c:func:`PyArg_Parse`, all use *format
15 format strings use the same syntax for each of these functions.
17 -----------------
19 -----------------
21 A format string consists of zero or more "format units." A format unit
22 describes one Python object; it is usually a single character or a parenthesized
23 sequence of format units. With a few exceptions, a format unit that is not a
25 these functions. In the following description, the quoted form is the format
[all …]
Dsys.rst38 :ref:`"main" thread <fork-and-threads>` (of the
39 :ref:`"main" interpreter <sub-interpreter-support>`). The same is
55 :ref:`"main" thread <fork-and-threads>` (of the
56 :ref:`"main" interpreter <sub-interpreter-support>`). The same is
67 any chance the process will call back into the Python interpreter.
72 :ref:`"main" thread <fork-and-threads>` (of the
73 :ref:`"main" interpreter <sub-interpreter-support>`). The same is
79 :func:`os.register_at_fork` allows registering custom Python functions
87 called in the new process if the Python interpreter will continue to be used.
124 that :ref:`Python is preinitialized <c-preinit>`.
[all …]
Dcall.rst12 ----------------------
21 ``callable(*args, **kwargs)`` in Python code.
22 *args* must be non-NULL (use an empty tuple if there are no arguments)
30 :ref:`call API <capi-call>`.
36 -----------------------
45 Additionally, some third-party extensions use *tp_call* directly
73 - *callable* is the object being called.
74 - *args* is a C array consisting of the positional arguments followed by the
77 - *nargsf* is the number of positional arguments plus possibly the
81 - *kwnames* is a tuple containing the names of the keyword arguments;
[all …]
/third_party/python/Tools/msi/
Dpurge.py4 # py -3 purge.py 3.5.1rc1
7 __author__ = 'Steve Dower <steve.dower@python.org>'
15 VERSION_RE = re.compile(r'(\d+\.\d+\.\d+)([A-Za-z_]+\d+)?$')
27 URL = "https://www.python.org/ftp/python/{}/".format(m.group(1))
54 "Windows6.0-KB2999226-x64.msu",
55 "Windows6.0-KB2999226-x86.msu",
56 "Windows6.1-KB2999226-x64.msu",
57 "Windows6.1-KB2999226-x86.msu",
58 "Windows8.1-KB2999226-x64.msu",
59 "Windows8.1-KB2999226-x86.msu",
[all …]
/third_party/python/PC/layout/support/
Dappxmanifest.py5 __author__ = "Steve Dower <steve.dower@python.org>"
24 Name="PythonSoftwareFoundation.Python.{}".format(VER_DOT),
25 Version="{}.{}.{}.0".format(VER_MAJOR, VER_MINOR, VER_FIELD3),
27 "APPX_DATA_PUBLISHER", "CN=4975D53F-AA7E-49A5-8B49-EA4FDC1BB66B"
29 DisplayName="Python {}".format(VER_DOT),
30 Description="The Python {} runtime and console.".format(VER_DOT),
42 DisplayName="Python {}".format(VER_DOT),
43 Description="Python interactive console",
50 DisplayName="Python {} (Windowed)".format(VER_DOT),
51 Description="Python windowed app launcher",
[all …]
Doptions.py5 __author__ = "Steve Dower <steve.dower@python.org>"
20 "pip-user": {"help": "pip.ini file for default --user"},
29 "underpth": {"help": "a python._pth file", "not-in-all": True},
32 "props": {"help": "a python.props file"},
33 "nuspec": {"help": "a python.nuspec file"},
35 "html-doc": {"help": "the HTML documentation"},
45 "pip-user",
83 "html-doc",
88 "options": ["stable", "zip-lib", "flat-dlls", "underpth", "precompile"],
96 help = "When specified, includes {}".format(info["help"])
[all …]
/third_party/python/Doc/library/
Dmarshal.rst1 :mod:`marshal` --- Internal Python object serialization
5 :synopsis: Convert Python objects to streams of bytes and back (with different
8 --------------
10 This module contains functions that can read and write Python values in a binary
11 format. The format is specific to Python, but independent of machine
12 architecture issues (e.g., you can write a Python value to a file on a PC,
13 transport the file to a Sun, and read it back there). Details of the format are
14 undocumented on purpose; it may change between Python versions (although it
22 transfer of Python objects through RPC calls, see the modules :mod:`pickle` and
24 writing the "pseudo-compiled" code for Python modules of :file:`.pyc` files.
[all …]
/third_party/protobuf/python/dist/
Dpython_downloads.bzl1 """Helper methods to download different python versions"""
9 strip_include_prefix = "Python-{}/Include",
19 sha256: The sha256 of the python package for the specified version
21 version = name.split("-")[1]
25 "https://www.python.org/ftp/python/{0}/Python-{0}.tgz"
26 .format(version),
29 build_file_content = limited_api_build_file.format(version),
31 "echo '#define SIZEOF_WCHAR_T 4' > Python-{}/Include/pyconfig.h"
32 .format(version),
40 shared_library = "python{0}.dll",
[all …]
Dsystem_python.bzl1 # Copyright (c) 2009-2021, Google LLC
4 # Use of this source code is governed by a BSD-style
6 # https://developers.google.com/open-source/licenses/bsd
8 """Repository rule for using Python 3.x headers from the system."""
10 # Mock out rules_python's pip.bzl for cases where no system python is found.
25 '''.format(repository_ctx.attr.name))
37 # Alias rules_python's pip.bzl for cases where a system python is found.
39 load("@rules_python//python:pip.bzl", _pip_parse = "pip_parse")
63 # Alias rules_fuzzing's requirements.bzl for cases where a system python is found.
74 load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
[all …]
/third_party/python/PCbuild/
Dregen.targets1 <?xml version="1.0" encoding="utf-8"?>
4 <_PegenSources Include="$(PySourcePath)Grammar\python.gram;$(PySourcePath)Grammar\Tokens" />
6 <_ASTSources Include="$(PySourcePath)Parser\Python.asdl" />
8 <Argument>-H</Argument>
11 <Argument>-I</Argument>
13 <_ASTOutputs Include="$(PySourcePath)Python\Python-ast.c">
14 <Argument>-C</Argument>
17 …\opcode.h;$(PySourcePath)Include\internal\pycore_opcode.h;$(PySourcePath)Python\opcode_targets.h" …
19 <_TokenOutputs Include="$(PySourcePath)Doc\library\token-list.inc">
20 <Format>rst</Format>
[all …]
/third_party/grpc/third_party/py/
Dpython_configure.bzl2 """Repository rule for Python autoconfiguration.
6 * `PYTHON3_BIN_PATH`: location of python binary.
7 * `PYTHON3_LIB_PATH`: Location of python libraries.
15 "Are Python headers installed? Try installing " +
16 "python3-dev on Debian-based systems. Try python3-devel " +
17 "on Redhat-based systems."
38 return os_name.find("windows") != -1
79 ["cmd.exe", "/c", "dir", src_dir, "/b", "/s", "/a-d"],
89 ["find", src_dir, "-follow", "-type", "f"],
106 if path[-1] == "/":
[all …]
/third_party/python/Tools/peg_generator/
DMakefile1 UNAME_S := $(shell uname -s)
3 PYTHON ?= ../../python macro
6 PYTHON ?= ../../python.exe macro
9 VENVPYTHON ?= $(VENVDIR)/bin/python
13 GRAMMAR = ../../Grammar/python.gram
18 TESTFLAGS = --short
21 $(PYTHON) -m zipfile -e data/xxl.zip data
26 $(PYTHON) -m pegen -q c $(GRAMMAR) $(TOKENS) -o peg_extension/parse.c --compile-extension
29 -rm -f peg_extension/*.o peg_extension/*.so peg_extension/parse.c
30 -rm -f data/xxl.py
[all …]
/third_party/skia/buildtools/clang_format/
DREADME.txt1 This folder contains clang-format scripts. The binaries will be automatically
8 python ~/depot_tools/upload_to_google_storage.py -b chromium-clang-format <FILENAME>
10 On Linux and Mac, check that clang-format has its +x bit set before you run this
16 python ~/depot_tools/download_from_google_storage.py -b chromium-clang-format -s <FILENAME>.sha1
19 python ~/depot_tools/third_party/gsutil/gsutil ls gs://chromium-clang-format/
22 python ~/depot_tools/third_party/gsutil/gsutil config
25 username should be the one that is on the ACL for the "chromium-clang-format"
/third_party/python/Tools/ssl/
Dmultissltests.py1 #!./python
2 """Run Python tests against multiple installations of OpenSSL and LibreSSL
10 (5) forces a recompilation of Python modules using the
12 (6) runs Python's test suite
14 The script must be run with Python's build directory as current working
21 Please keep this script compatible with Python 2.7, and 3.4 to 3.7.
23 (c) 2013-2017 Christian Heimes <christian@python.org>
75 '--debug',
80 '--disable-ancient',
85 '--openssl',
[all …]
/third_party/jerryscript/tools/
Dsrcgenerator.py1 #!/usr/bin/env python
9 # http://www.apache.org/licenses/LICENSE-2.0
28 JERRY_CORE = os.path.join(ROOT_DIR, 'jerry-core')
29 JERRY_PORT = os.path.join(ROOT_DIR, 'jerry-port', 'default')
30 JERRY_LIBM = os.path.join(ROOT_DIR, 'jerry-libm')
39 cmd.append('--verbose')
46 'python', SRCMERGER,
47 '--base-dir', JERRY_CORE,
48 '--input={}/api/jerry.c'.format(JERRY_CORE),
49 '--output={}/jerryscript.c'.format(output_dir),
[all …]
/third_party/python/Doc/whatsnew/
D3.1.rst2 What's New In Python 3.1
37 sufficient; the e-mail address isn't necessary.
49 This article explains the new features in Python 3.1, compared to 3.0.
50 Python 3.1 was released on June 27, 2009.
56 Regular Python dictionaries iterate over key/value pairs in arbitrary order.
73 the underlying tuple indices. The :mod:`json` module is being built-out with
75 Support was also added for third-party tools like `PyYAML <https://pyyaml.org/>`_.
79 :pep:`372` - Ordered Dictionaries
84 PEP 378: Format Specifier for Thousands Separator
87 The built-in :func:`format` function and the :meth:`str.format` method use
[all …]
/third_party/skia/third_party/externals/tint/
DDEPS22 'third_party/gpuweb-cts': Var('chromium_git') + Var('github') +
25 'third_party/spirv-headers': Var('chromium_git') + Var('github') +
26 '/KhronosGroup/SPIRV-Headers.git@' + Var('spirv_headers_revision'),
28 'third_party/spirv-tools': Var('chromium_git') + Var('github') +
29 '/KhronosGroup//SPIRV-Tools.git@' + Var('spirv_tools_revision'),
56 # Pull clang-format binaries using checked-in hashes.
62 '--no_resume',
63 '--platform=win32',
64 '--no_auth',
65 '--bucket', 'chromium-clang-format',
[all …]
/third_party/grpc/src/python/grpcio/
Dsupport.py7 # http://www.apache.org/licenses/LICENSE-2.0
25 # after Python 3.10.6.
26 # TODO(xuanwn): Remove this once Python version floor is higher than 3.10.
32 #include <Python.h>
36 Could not find <Python.h>. This could mean the following:
37 * You're on Ubuntu and haven't run `apt-get install <PY_REPR>-dev`.
38 * You're on RHEL/Fedora and haven't run `yum install <PY_REPR>-devel` or
39 `dnf install <PY_REPR>-devel` (make sure you also have redhat-rpm-config
41 * You're on Mac OS X and the usual Python framework was somehow corrupted
42 (check your environment variables or try re-installing?)
[all …]
/third_party/grpc/tools/run_tests/artifacts/
Dartifact_targets.py8 # http://www.apache.org/licenses/LICENSE-2.0
45 docker_args += ["-e", "%s=%s" % (k, v)]
105 _MACOS_COMPAT_FLAG = "-mmacosx-version-min=10.10"
107 _ARCH_FLAG_MAP = {"x86": "-m32", "x64": "-m64"}
111 """Builds Python artifacts."""
117 self.labels = ["artifact", "python", platform, arch, py_version]
122 self.labels.append("latest-manylinux")
140 # building the native extension is the most time-consuming part of the build
144 environ["ARCHFLAGS"] = "-arch arm64 -arch x86_64"
149 environ["PYTHON"] = "/opt/python/{}/bin/python3".format(
[all …]
/third_party/grpc/bazel/
Dpython_rules.bzl7 # http://www.apache.org/licenses/LICENSE-2.0
14 """Generates and compiles Python gRPC stubs from proto_library rules."""
17 load("@rules_python//python:py_info.bzl", "PyInfo")
36 "The Python outputs from the Protobuf compiler.",
39 "generated_py_srcs": "The direct (not transitive) generated Python source files.",
50 # Early return for well-known protos.
73 "--python_out={}".format(out_dir.path),
74 "--pyi_out={}".format(out_dir.path),
76 "--proto_path={}".format(get_include_directory(i))
79 "--proto_path={}".format(context.genfiles_dir.path),
[all …]
/third_party/skia/third_party/externals/brotli/python/
DREADME.md1 This directory contains the code for the Python `brotli` module,
4 Only Python 2.7+ is supported.
10 If you just want to install the latest release of the Python `brotli`
24 $ make # Build the module in-place
38 Brotli's code follows the [Google Python Style Guide][]. To
39 automatically format your code, first install [YAPF][]:
43 Then, to format all files in the project, you can run:
45 $ make fix # Automatically format code
51 [development mode]: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode
52 [Google Python Style Guide]: https://google.github.io/styleguide/pyguide.html
/third_party/brotli/python/
DREADME.md1 This directory contains the code for the Python `brotli` module,
4 Only Python 2.7+ is supported.
10 If you just want to install the latest release of the Python `brotli`
24 $ make # Build the module in-place
38 Brotli's code follows the [Google Python Style Guide][]. To
39 automatically format your code, first install [YAPF][]:
43 Then, to format all files in the project, you can run:
45 $ make fix # Automatically format code
51 [development mode]: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode
52 [Google Python Style Guide]: https://google.github.io/styleguide/pyguide.html
/third_party/mindspore/mindspore-src/source/tests/ut/python/dataset_deprecated/
Dtest_normalize_op.py1 # Copyright 2019-2022 Huawei Technologies Co., Ltd
7 # http://www.apache.org/licenses/LICENSE-2.0
26 DATA_DIR = ["../data/dataset/test_tf_file_3_images/train-0000-of-0001.data"]
39 image = image - np.array(mean)
56 elif op_type == "python":
118 logger.info("image_{}, mse: {}".format(num_iter + 1, mse))
128 Description: Test Python op in dataset pipeline
131 logger.info("Test Normalize in python")
158 logger.info("image_{}, mse: {}".format(num_iter + 1, mse))
168 Description: Test C++ op and Python op in same dataset pipeline
[all …]
/third_party/python/Doc/tutorial/
Dfloatingpoint.rst5 .. _tut-fp-issues:
14 Floating-point numbers are represented in computer hardware as base 2 (binary)
22 fractions. A consequence is that, in general, the decimal floating-point
23 numbers you enter are only approximated by the binary floating-point numbers
57 displayed. Python only prints a decimal approximation to the true decimal
59 Python were to print the true decimal value of the binary approximation stored
65 That is more digits than most people find useful, so Python keeps the number
82 Historically, the Python prompt and built-in :func:`repr` function would choose
84 Python 3.1, Python (on most systems) is now able to choose the shortest of
87 Note that this is in the very nature of binary floating-point: this is not a bug
[all …]
/third_party/python/Doc/extending/
Dextending.rst4 .. _extending-intro:
7 Extending Python with C or C++
10 It is quite easy to add new built-in modules to Python, if you know how to
12 done directly in Python: they can implement new built-in object types, and they
15 To support extensions, the Python API (Application Programmers Interface)
17 aspects of the Python run-time system. The Python API is incorporated in a C
18 source file by including the header ``"Python.h"``.
26 not work on other Python implementations. In many cases, it is possible to
32 These modules let you write Python code to interface with C code and are more
33 portable between implementations of Python than writing and compiling a C
[all …]

12345678910>>...42