관리-도구
편집 파일: audio.cpython-311.pyc
� c��f � � � d Z dgZddlmZ ddlmZ ddlmZ G d� de� � Zg Z d� Z d� Zed � � � Zed � � � Z ed� � � ZdS ) z/Class representing audio/* type MIME documents.� MIMEAudio� )�BytesIO)�encoders)�MIMENonMultipartc �. � e Zd ZdZdej fdd�d�ZdS )r z,Class for generating audio/* MIME documents.N)�policyc � � |�t |� � }|�t d� � �t j | d|fd|i|�� | � |� � || � � dS )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/python311/lib64/python3.11/email/mime/audio.pyr zMIMEAudio.__init__ s� � �, ���Z�(�(�H����?�@�@�@��!�$��� -� -�&� -�$+� -� -� -�����$�$�$��������� )�__name__� __module__�__qualname__�__doc__r � encode_base64r � r r r r sD � � � � � �6�6�,0�"�0��<@�� � � � � � r c �p � | d d� }t |� � }t D ]} |||� � x}r|c S �d S )Ni )r �_rules)�data�hdr�fakefile�testfn�ress r r r 8 sY � � �t��t�*�C��s�|�|�H�� � ���&��h�'�'�'�3� ��J�J�J� � �tr c �: � t � | � � | S )N)r �append)�rulefuncs r �ruler&