관리-도구
편집 파일: audio.cpython-312.pyc
� �Q�f � � � d Z dgZddlmZ ddlmZ ddlmZ G d� de� Zg Z d� Z d� Zed � � Zed � � Z ed� � Zy) z/Class representing audio/* type MIME documents.� MIMEAudio� )�BytesIO)�encoders)�MIMENonMultipartc �6 � e Zd ZdZdej fdd�d�Zy)r z,Class for generating audio/* MIME documents.N)�policyc � � |�t |� }|�t d� �t j | d|fd|i|�� | j |� || � y)a� Create an audio/* type MIME document. _audiodata contains the bytes for the raw audio data. If this data can be decoded as au, wav, aiff, or aifc, 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 subtype�audior )�_what� TypeErrorr �__init__�set_payload)�self� _audiodata�_subtype�_encoderr �_paramss �7/opt/alt/python312/lib64/python3.12/email/mime/audio.pyr zMIMEAudio.__init__ s^ � �, ���Z�(�H����?�@�@��!�!�$��� -�&� -�$+� -�����$���� )�__name__� __module__�__qualname__�__doc__r � encode_base64r � r r r r s � �6�,0�"�0�0��<@�r c �X � | d d }t |� }t D ] } |||� x}s�|c S y )Ni )r �_rules)�data�hdr�fakefile�testfn�ress r r r 8 s>