Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/email/mime/image.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@sUdZdgZddlZddlmZddlmZdefd��YZdS(s/Class representing image/* type MIME documents.t	MIMEImagei�N(tencoders(tMIMENonMultipartcBs eZdZdejd�ZRS(s1Class for generating image/* type MIME documents.cKsm|dkr!tjd|�}n|dkr<td��ntj|d||�|j|�||�dS(s�Create an image/* type MIME document.

        _imagedata is a string containing the raw image data.  If this data
        can be decoded by the standard Python `imghdr' module, then the
        subtype will be automatically included in the Content-Type header.
        Otherwise, you can specify the specific image subtype via the _subtype
        parameter.

        _encoder is a function which will perform the actual encoding for
        transport of the image data.  It takes one argument, which is this
        Image instance.  It should use get_payload() and set_payload() to
        change the payload to the encoded form.  It should also add any
        Content-Transfer-Encoding or other headers to the message as
        necessary.  The default encoding is Base64.

        Any additional keyword arguments are passed to the base class
        constructor, which turns them into parameters on the Content-Type
        header.
        s"Could not guess image MIME subtypetimageN(tNonetimghdrtwhatt	TypeErrorRt__init__tset_payload(tselft
_imagedatat_subtypet_encodert_params((s&/sys/lib/python2.7/email/mime/image.pyRs
N(t__name__t
__module__t__doc__RRt
encode_base64R(((s&/sys/lib/python2.7/email/mime/image.pyRs(Rt__all__RtemailRtemail.mime.nonmultipartRR(((s&/sys/lib/python2.7/email/mime/image.pyt<module>s
	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].