Use python3

This commit is contained in:
Andrew Murray 2021-05-08 12:37:06 +10:00
parent 8354fa4929
commit 3795772187
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. * A list or tuple of formats to attempt to load the file in.
This can be used to restrict the set of formats checked. This can be used to restrict the set of formats checked.
Pass ``None`` to try all supported formats. You can print the set of 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. the :py:func:`PIL.features.pilinfo` function.
ImageOps.autocontrast: add mask parameter ImageOps.autocontrast: add mask parameter

View File

@ -375,7 +375,7 @@ if sys.platform == "darwin":
if __name__ == "__main__": if __name__ == "__main__":
if len(sys.argv) < 2: if len(sys.argv) < 2:
print("Syntax: python IcnsImagePlugin.py [file]") print("Syntax: python3 IcnsImagePlugin.py [file]")
sys.exit() sys.exit()
with open(sys.argv[1], "rb") as fp: 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. :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. This can be used to restrict the set of formats checked.
Pass ``None`` to try all supported formats. You can print the set of 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. the :py:func:`PIL.features.pilinfo` function.
:returns: An :py:class:`~PIL.Image.Image` object. :returns: An :py:class:`~PIL.Image.Image` object.
:exception FileNotFoundError: If the file cannot be found. :exception FileNotFoundError: If the file cannot be found.

View File

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

View File

@ -218,7 +218,7 @@ def get_supported():
def pilinfo(out=None, supported_formats=True): def pilinfo(out=None, supported_formats=True):
""" """
Prints information about this installation of Pillow. 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: :param out:
The output stream to print to. Defaults to ``sys.stdout`` if ``None``. The output stream to print to. Defaults to ``sys.stdout`` if ``None``.