Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/email/mime/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/email/mime/audio.pyc |
hRc @ s d Z d g Z d d k Z d d k l Z d d k l Z d d k l Z h d d <d d <d d <d d <Z d Z d e f d YZ d S( s/ Class representing audio/* type MIME documents.t MIMEAudioiN( t StringIO( t encoders( t MIMENonMultipartt basict aus x-wavt wavs x-aifft aifft aifcc C s_ | d } t | } xB t i D]7 } | | | } | d j o t i | d Sq q 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/local/lib/python2.5/email/mime/audio.pyt _whatsnd s c B s e Z d Z d e i d Z RS( s, Class for generating audio/* MIME documents.c K sk | d j o t | } n | d j o t d n t i | d | | | i | | | 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/local/lib/python2.5/email/mime/audio.pyR - s N( t __name__t __module__t __doc__R R t encode_base64R ( ( ( s, /usr/local/lib/python2.5/email/mime/audio.pyR * s ( R t __all__R t cStringIOR t emailR t email.mime.nonmultipartR R R R ( ( ( s, /usr/local/lib/python2.5/email/mime/audio.pys <module> s