/third_party/python/Lib/email/ |
D | contentmanager.py | 20 maintype = msg.get_content_maintype() 21 if maintype in self.get_handlers: 22 return self.get_handlers[maintype](msg, *args, **kw) 73 for maintype in 'audio image video application'.split(): 74 raw_data_manager.add_get_handler(maintype, get_non_text_content) 95 def _prepare_set(msg, maintype, subtype, headers): argument 96 msg['Content-Type'] = '/'.join((maintype, subtype)) 228 def set_bytes_content(msg, data, maintype, subtype, cte='base64', argument 231 _prepare_set(msg, maintype, subtype, headers)
|
D | iterators.py | 45 def typed_subpart_iterator(msg, maintype='text', subtype=None): argument 53 if subpart.get_content_maintype() == maintype:
|
D | message.py | 980 maintype, subtype = part.get_content_type().split('/') 981 if maintype == 'text': 985 if maintype != 'multipart' or not self.is_multipart(): 1041 maintype, subtype = self.get_content_type().split('/') 1042 if maintype != 'multipart' or subtype == 'alternative': 1054 if maintype == 'multipart' and subtype == 'related': 1078 maintype, subtype = part.get_content_type().split('/') 1079 if ((maintype, subtype) in self._body_types and
|
D | generator.py | 487 maintype = part.get_content_maintype() 488 if maintype == 'text': 490 elif maintype == 'multipart':
|
D | headerregistry.py | 474 self._maintype = utils._sanitize(self._parse_tree.maintype) 478 def maintype(self): member in ContentTypeHeader 487 return self.maintype + '/' + self.subtype
|
D | _header_value_parser.py | 824 maintype = 'text' variable in ContentType 2650 ctype.maintype = token.value.strip().lower() 2671 del ctype.maintype, ctype.subtype
|
/third_party/python/Doc/includes/ |
D | email-dir.py | 61 maintype, subtype = ctype.split('/', 1) 64 maintype=maintype,
|
D | email-mime.py | 24 msg.add_attachment(img_data, maintype='image',
|
D | email-read-alternative.py | 39 if richest['content-type'].maintype == 'text':
|
/third_party/python/Doc/library/ |
D | email.contentmanager.rst | 35 * the string representing the full MIME type (``maintype/subtype``) 36 * the string representing the ``maintype`` 45 If the ``maintype`` is ``multipart``, raise a :exc:`TypeError`; otherwise 123 set_content(msg, <'bytes'>, maintype, subtype, cte="base64", \ 132 Add a :mailheader:`Content-Type` header with a ``maintype/subtype`` 135 * For ``str``, set the MIME ``maintype`` to ``text``, and set the 137 * For ``bytes``, use the specified *maintype* and *subtype*, or 139 * For :class:`~email.message.EmailMessage` objects, set the maintype
|
D | email.iterators.rst | 30 .. function:: typed_subpart_iterator(msg, maintype='text', subtype=None) 33 match the MIME type specified by *maintype* and *subtype*. 36 done only with the main type. *maintype* is optional too; it defaults to
|
D | email.headerregistry.rst | 280 The content type string, in the form ``maintype/subtype``. 282 .. attribute:: maintype
|
D | email.compat32-message.rst | 432 lower case of the form :mimetype:`maintype/subtype`. If there was no 447 Return the message's main content type. This is the :mimetype:`maintype` 568 header. *type* must be a string in the form :mimetype:`maintype/subtype`,
|
D | email.message.rst | 312 :mimetype:`maintype/subtype`. If there is no :mailheader:`Content-Type` 328 Return the message's main content type. This is the :mimetype:`maintype`
|
D | email.generator.rst | 256 * ``maintype`` -- Main MIME type of the non-\ :mimetype:`text` part
|
/third_party/python/Lib/test/test_email/ |
D | test_contentmanager.py | 236 for maintype in 'audio image video application'.split(): 237 with self.subTest(maintype=maintype): 238 m = self._str_msg(template.format(maintype+'/foo')) 782 maintype='application', subtype='octet-stream', cte='7bit')
|
D | test_headerregistry.py | 241 maintype, argument 252 self.assertEqual(h.maintype, maintype)
|