%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core20/current/lib/python3.8/email/mime/__pycache__/
Upload File :
Create Path :
Current File : //snap/core20/current/lib/python3.8/email/mime/__pycache__/audio.cpython-38.pyc

U

k�]e�
�@s`dZdgZddlZddlmZddlmZddlmZddd	d	d
�Z	dd�Z
Gd
d�de�ZdS)z/Class representing audio/* type MIME documents.�	MIMEAudio�N)�BytesIO)�encoders)�MIMENonMultipartZbasiczx-wavzx-aiff)ZauZwavZaiffZaifccCsH|dd�}t|�}tjD](}|||�}|dk	rt�|d�SqdS)aTry to identify a sound file type.

    sndhdr.what() has a pretty cruddy interface, unfortunately.  This is why
    we re-do it here.  It would be easier to reverse engineer the Unix 'file'
    command and use the standard 'magic' file, as shipped with a modern Unix.
    Nir)r�sndhdrZtests�_sndhdr_MIMEmap�get)�dataZhdrZfakefileZtestfn�res�r�&/usr/lib/python3.8/email/mime/audio.py�_whatsnds

r
c@s&eZdZdZdejfdd�dd�ZdS)rz,Class for generating audio/* MIME documents.N)�policycKsP|dkrt|�}|dkr td��tj|d|fd|i|��|�|�||�dS)aCreate an audio/* type MIME document.

        _audiodata is a string containing the raw audio data.  If this data
        can be decoded by the standard Python `sndhdr' module, then the
        subtype will be automatically included in the Content-Type header.
        Otherwise, you can specify  the specific audio subtype via the
        _subtype parameter.  If _subtype is not given, and no subtype can be
        guessed, a TypeError is raised.

        _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.
        Nz!Could not find audio MIME subtypeZaudior)r
�	TypeErrorr�__init__Zset_payload)�selfZ
_audiodataZ_subtypeZ_encoderrZ_paramsrrrr-s�
zMIMEAudio.__init__)�__name__�
__module__�__qualname__�__doc__rZ
encode_base64rrrrrr*s��)r�__all__r�iorZemailrZemail.mime.nonmultipartrrr
rrrrr�<module>s�

Zerion Mini Shell 1.0