%PDF- %PDF-
Direktori : /proc/self/root/proc/thread-self/root/lib64/python2.7/email/mime/ |
Current File : //proc/self/root/proc/thread-self/root/lib64/python2.7/email/mime/audio.pyc |
� {fc @ s� d Z d g Z d d l Z d d l m Z d d l m Z d d l m Z i d d 6d d 6d d 6d d 6Z d � Z d e f d � � YZ d S( s/ Class representing audio/* type MIME documents.t MIMEAudioi����N( t StringIO( t encoders( t MIMENonMultipartt basict aus x-wavt wavs x-aifft aifft aifcc C sZ | d } t | � } x= t j D]2 } | | | � } | d k r t j | d � Sq Wd S( s Try 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. i i N( R t sndhdrt testst Nonet _sndhdr_MIMEmapt get( t datat hdrt fakefilet testfnt res( ( s( /usr/lib64/python2.7/email/mime/audio.pyt _whatsnd s c B s e Z d Z d e j d � Z RS( s, Class for generating audio/* MIME documents.c K sg | d k r t | � } n | d k r6 t d � � n t j | d | | � | j | � | | � d S( s 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. s! Could not find audio MIME subtypet audioN( R R t TypeErrorR t __init__t set_payload( t selft _audiodatat _subtypet _encodert _params( ( s( /usr/lib64/python2.7/email/mime/audio.pyR - s N( t __name__t __module__t __doc__R R t encode_base64R ( ( ( s( /usr/lib64/python2.7/email/mime/audio.pyR * s ( R t __all__R t cStringIOR t emailR t email.mime.nonmultipartR R R R ( ( ( s( /usr/lib64/python2.7/email/mime/audio.pyt <module> s