Merge pull request #5477 from radarhere/python3

Use python3
This commit is contained in:
Hugo van Kemenade 2021-05-08 08:19:36 +03:00 committed by GitHub
commit 2a94728c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@ Added a new ``formats`` parameter to :py:func:`.Image.open`:
* A list or tuple of formats to attempt to load the file in.
This can be used to restrict the set of formats checked.
Pass ``None`` to try all supported formats. You can print the set of
available formats by running ``python -m PIL`` or using
available formats by running ``python3 -m PIL`` or using
the :py:func:`PIL.features.pilinfo` function.
ImageOps.autocontrast: add mask parameter

View File

@ -375,7 +375,7 @@ if sys.platform == "darwin":
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Syntax: python IcnsImagePlugin.py [file]")
print("Syntax: python3 IcnsImagePlugin.py [file]")
sys.exit()
with open(sys.argv[1], "rb") as fp:

View File

@ -2887,7 +2887,7 @@ def open(fp, mode="r", formats=None):
:param formats: A list or tuple of formats to attempt to load the file in.
This can be used to restrict the set of formats checked.
Pass ``None`` to try all supported formats. You can print the set of
available formats by running ``python -m PIL`` or using
available formats by running ``python3 -m PIL`` or using
the :py:func:`PIL.features.pilinfo` function.
:returns: An :py:class:`~PIL.Image.Image` object.
:exception FileNotFoundError: If the file cannot be found.

View File

@ -256,7 +256,7 @@ else:
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Syntax: python ImageShow.py imagefile [title]")
print("Syntax: python3 ImageShow.py imagefile [title]")
sys.exit()
with Image.open(sys.argv[1]) as im:

View File

@ -296,7 +296,7 @@ Image.register_save(SpiderImageFile.format, _save_spider)
if __name__ == "__main__":
if len(sys.argv) < 2:
print("Syntax: python SpiderImagePlugin.py [infile] [outfile]")
print("Syntax: python3 SpiderImagePlugin.py [infile] [outfile]")
sys.exit()
filename = sys.argv[1]

View File

@ -218,7 +218,7 @@ def get_supported():
def pilinfo(out=None, supported_formats=True):
"""
Prints information about this installation of Pillow.
This function can be called with ``python -m PIL``.
This function can be called with ``python3 -m PIL``.
:param out:
The output stream to print to. Defaults to ``sys.stdout`` if ``None``.