chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44dcde58-1690-4401-ab5e-750852ffb69f | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,657 | supabase-export-v2 | 2e03279c9cc2b245 | faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get.
If you do have a :class:`MaildirMessage` object, use
its :meth:`~MaildirMessage.get_info` method instead, because
changes made by the message's :meth:`~MaildirMessage.set... | trusted_official_docs | CPython Docs | faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get.
If you do have a :class:`MaildirMessage` object, use
its :meth:`~MaildirMessage.get_info` method instead, because
changes made by the message's :meth:`~MaildirMessage.set... | faster, because it does not open the message file. Use this method when iterating over the keys to determine which messages are interesting to get.
If you do have a :class:`MaildirMessage` object, use
its :meth:`~MaildirMessage.get_info` method instead, because
changes made by the message's :meth:`~MaildirMessage.set... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
45ea6ce2-d437-40e2-8e9f-fbc87a3c438f | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,616 | supabase-export-v2 | 6228bbb7dccab1f9 | .. class:: Maildir(dirname, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
*factory* is a callable object that accepts a file-like message representation
(which behaves as if opened in binary mode) and returns a custom representation. If *factory* is ``None``, :cl... | trusted_official_docs | CPython Docs | .. class:: Maildir(dirname, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
*factory* is a callable object that accepts a file-like message representation
(which behaves as if opened in binary mode) and returns a custom representation. If *factory* is ``None``, :cl... | .. class:: Maildir(dirname, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
*factory* is a callable object that accepts a file-like message representation
(which behaves as if opened in binary mode) and returns a custom representation. If *factory* is ``None``, :cl... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
47d593a5-efac-4e55-a6d5-d5d28f6d4bc1 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,811 | supabase-export-v2 | f3e6994984a82620 | a :class:`!MaildirMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+--------------------+----------------------------------------------+
| Resulting state | ... | trusted_official_docs | CPython Docs | a :class:`!MaildirMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+--------------------+----------------------------------------------+
| Resulting state | ... | a :class:`!MaildirMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+--------------------+----------------------------------------------+
| Resulting state | ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
48b4fb63-0642-49a8-93c2-5accc9322bc0 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,547 | supabase-export-v2 | 86c2f4f5685ceb6d | may be added to a :class:`!Mailbox` instance using the set-like method :meth:`add` and removed using a ``del`` statement or the set-like methods :meth:`remove` and :meth:`discard`.
:class:`!Mailbox` interface semantics differ from dictionary semantics in some
noteworthy ways. Each time a message is requested, a new re... | trusted_official_docs | CPython Docs | may be added to a :class:`!Mailbox` instance using the set-like method :meth:`add` and removed using a ``del`` statement or the set-like methods :meth:`remove` and :meth:`discard`.
:class:`!Mailbox` interface semantics differ from dictionary semantics in some
noteworthy ways. Each time a message is requested, a new re... | may be added to a :class:`!Mailbox` instance using the set-like method :meth:`add` and removed using a ``del`` statement or the set-like methods :meth:`remove` and :meth:`discard`.
:class:`!Mailbox` interface semantics differ from dictionary semantics in some
noteworthy ways. Each time a message is requested, a new re... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4b0e4635-fe51-40dc-be38-00929a3e449b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,842 | supabase-export-v2 | 91ab6b0473a1eed1 | When an :class:`!mboxMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+===================+=============================+
| R flag and O flag | no "unseen"... | trusted_official_docs | CPython Docs | When an :class:`!mboxMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+===================+=============================+
| R flag and O flag | no "unseen"... | When an :class:`!mboxMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+===================+=============================+
| R flag and O flag | no "unseen"... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4b698d13-7edc-43ff-b6a3-a2198c953193 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,902 | supabase-export-v2 | bb2aa7cc21f4b1d1 | :mailheader:`Status` header, and the "D", "F", and "A" flags are stored in the :mailheader:`X-Status` header. The flags and headers typically appear in the order mentioned.
:class:`!MMDFMessage` instances offer the following methods, which are
identical to those offered by :class:`mboxMessage`: | trusted_official_docs | CPython Docs | :mailheader:`Status` header, and the "D", "F", and "A" flags are stored in the :mailheader:`X-Status` header. The flags and headers typically appear in the order mentioned.
:class:`!MMDFMessage` instances offer the following methods, which are
identical to those offered by :class:`mboxMessage`: | :mailheader:`Status` header, and the "D", "F", and "A" flags are stored in the :mailheader:`X-Status` header. The flags and headers typically appear in the order mentioned.
:class:`!MMDFMessage` instances offer the following methods, which are
identical to those offered by :class:`mboxMessage`: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4c99b94b-62e5-411d-b739-baeb096466d6 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,685 | supabase-export-v2 | e27af00dbe9c9d70 | mbox mailbox are stored in a single file with the beginning of each message indicated by a line whose first five characters are "From ".
Several variations of the mbox format exist to address perceived shortcomings in
the original. In the interest of compatibility, :class:`!mbox` implements the
original format, which... | trusted_official_docs | CPython Docs | mbox mailbox are stored in a single file with the beginning of each message indicated by a line whose first five characters are "From ".
Several variations of the mbox format exist to address perceived shortcomings in
the original. In the interest of compatibility, :class:`!mbox` implements the
original format, which... | mbox mailbox are stored in a single file with the beginning of each message indicated by a line whose first five characters are "From ".
Several variations of the mbox format exist to address perceived shortcomings in
the original. In the interest of compatibility, :class:`!mbox` implements the
original format, which... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4d8e2a4a-00a6-4b30-b753-d9f96e1deef1 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,691 | supabase-export-v2 | d7bb33a8e47d6937 | Using the file after calling :meth:`~Mailbox.flush` or :meth:`~Mailbox.close` on the :class:`!mbox` instance may yield unpredictable results or raise an exception.
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is... | trusted_official_docs | CPython Docs | Using the file after calling :meth:`~Mailbox.flush` or :meth:`~Mailbox.close` on the :class:`!mbox` instance may yield unpredictable results or raise an exception.
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is... | Using the file after calling :meth:`~Mailbox.flush` or :meth:`~Mailbox.close` on the :class:`!mbox` instance may yield unpredictable results or raise an exception.
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
51b64e79-a4cc-4d63-b9e1-b909558cf37b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,703 | supabase-export-v2 | 2817b1248bba2563 | .. class:: MH(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`MHMessa... | trusted_official_docs | CPython Docs | .. class:: MH(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`MHMessa... | .. class:: MH(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`MHMessa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
529b1b3f-0418-4ea1-b092-6602aa11712e | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,752 | supabase-export-v2 | 21e390f84f3bb8cb | .. method:: get_file(key)
In Babyl mailboxes, the headers of a message are not stored contiguously
with the body of the message. To generate a file-like representation, the
headers and body are copied together into an :class:`io.BytesIO` instance,
which has an API identical to that of a
file. As a result, the file-... | trusted_official_docs | CPython Docs | .. method:: get_file(key)
In Babyl mailboxes, the headers of a message are not stored contiguously
with the body of the message. To generate a file-like representation, the
headers and body are copied together into an :class:`io.BytesIO` instance,
which has an API identical to that of a
file. As a result, the file-... | .. method:: get_file(key)
In Babyl mailboxes, the headers of a message are not stored contiguously
with the body of the message. To generate a file-like representation, the
headers and body are copied together into an :class:`io.BytesIO` instance,
which has an API identical to that of a
file. As a result, the file-... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
52b335f0-e16a-4e5e-a5ba-f5e09d0d8ac1 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,686 | supabase-export-v2 | 870d17b97b12055e | body are transformed to ">From " when storing the message, although occurrences of ">From " are not transformed to "From " when reading the message.
Some :class:`Mailbox` methods implemented by :class:`!mbox` deserve special
remarks: | trusted_official_docs | CPython Docs | body are transformed to ">From " when storing the message, although occurrences of ">From " are not transformed to "From " when reading the message.
Some :class:`Mailbox` methods implemented by :class:`!mbox` deserve special
remarks: | body are transformed to ">From " when storing the message, although occurrences of ">From " are not transformed to "From " when reading the message.
Some :class:`Mailbox` methods implemented by :class:`!mbox` deserve special
remarks: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5460c6c8-2c87-4595-85aa-c466833ded5b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,918 | supabase-export-v2 | e156ba642068d663 | When an :class:`!MMDFMessage` instance is created based upon an :class:`MHMessage` instance, the following conversions take place:
+-------------------+--------------------------+
| Resulting state | :class:`MHMessage` state |
+===================+==========================+
| R flag and O flag | no "unseen" sequence |... | trusted_official_docs | CPython Docs | When an :class:`!MMDFMessage` instance is created based upon an :class:`MHMessage` instance, the following conversions take place:
+-------------------+--------------------------+
| Resulting state | :class:`MHMessage` state |
+===================+==========================+
| R flag and O flag | no "unseen" sequence |... | When an :class:`!MMDFMessage` instance is created based upon an :class:`MHMessage` instance, the following conversions take place:
+-------------------+--------------------------+
| Resulting state | :class:`MHMessage` state |
+===================+==========================+
| R flag and O flag | no "unseen" sequence |... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
552521d6-6741-4853-a79b-800f60e8387a | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,940 | supabase-export-v2 | 562c3a8cc8109909 | import mailbox destination = mailbox.MH('~/Mail') destination.lock() for message in mailbox.Babyl('~/RMAIL'): destination.add(mailbox.MHMessage(message)) destination.flush() destination.unlock()
This example sorts mail from several mailing lists into different mailboxes,
being careful to avoid mail corruption due to co... | trusted_official_docs | CPython Docs | import mailbox destination = mailbox.MH('~/Mail') destination.lock() for message in mailbox.Babyl('~/RMAIL'): destination.add(mailbox.MHMessage(message)) destination.flush() destination.unlock()
This example sorts mail from several mailing lists into different mailboxes,
being careful to avoid mail corruption due to co... | import mailbox destination = mailbox.MH('~/Mail') destination.lock() for message in mailbox.Babyl('~/RMAIL'): destination.add(mailbox.MHMessage(message)) destination.flush() destination.unlock()
This example sorts mail from several mailing lists into different mailboxes,
being careful to avoid mail corruption due to co... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5bff0c67-761c-48c4-ba61-2fa3307e9927 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,839 | supabase-export-v2 | 28232a955ff0b656 | +-----------------+-------------------------------+ | D flag | T flag | +-----------------+-------------------------------+ | F flag | F flag | +-----------------+-------------------------------+ | A flag | R flag | +-----------------+-------------------------------+
When an :class:`!mboxMessage` instance is created ba... | trusted_official_docs | CPython Docs | +-----------------+-------------------------------+ | D flag | T flag | +-----------------+-------------------------------+ | F flag | F flag | +-----------------+-------------------------------+ | A flag | R flag | +-----------------+-------------------------------+
When an :class:`!mboxMessage` instance is created ba... | +-----------------+-------------------------------+ | D flag | T flag | +-----------------+-------------------------------+ | F flag | F flag | +-----------------+-------------------------------+ | A flag | R flag | +-----------------+-------------------------------+
When an :class:`!mboxMessage` instance is created ba... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d3a16ca-ee1a-4f1e-8372-aafa50db19c3 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,820 | supabase-export-v2 | 16f800a7ca3f5d4a | A message with mbox-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Messages in an mbox mailbox are stored together in a single file. The
sender's envelope address and the time of delivery are typically stored in a
line beginning with "From " that is used to indi... | trusted_official_docs | CPython Docs | A message with mbox-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Messages in an mbox mailbox are stored together in a single file. The
sender's envelope address and the time of delivery are typically stored in a
line beginning with "From " that is used to indi... | A message with mbox-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Messages in an mbox mailbox are stored together in a single file. The
sender's envelope address and the time of delivery are typically stored in a
line beginning with "From " that is used to indi... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d3f738e-c4d4-49d7-91c8-643a8f5f671f | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,898 | supabase-export-v2 | cc73ed230d3be128 | A message with MMDF-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
As with message in an mbox mailbox, MMDF messages are stored with the
sender's address and the delivery date in an initial line beginning with
"From ". Likewise, flags that indicate the state of ... | trusted_official_docs | CPython Docs | A message with MMDF-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
As with message in an mbox mailbox, MMDF messages are stored with the
sender's address and the delivery date in an initial line beginning with
"From ". Likewise, flags that indicate the state of ... | A message with MMDF-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
As with message in an mbox mailbox, MMDF messages are stored with the
sender's address and the delivery date in an initial line beginning with
"From ". Likewise, flags that indicate the state of ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5da0c956-4e07-4528-bb0a-651502fcd291 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,861 | supabase-export-v2 | 8201ec02b912e18a | When an :class:`!MHMessage` instance is created based upon a :class:`MaildirMessage` instance, the following conversions take place:
+--------------------+-------------------------------+
| Resulting state | :class:`MaildirMessage` state |
+====================+===============================+
| "unseen" sequence | no ... | trusted_official_docs | CPython Docs | When an :class:`!MHMessage` instance is created based upon a :class:`MaildirMessage` instance, the following conversions take place:
+--------------------+-------------------------------+
| Resulting state | :class:`MaildirMessage` state |
+====================+===============================+
| "unseen" sequence | no ... | When an :class:`!MHMessage` instance is created based upon a :class:`MaildirMessage` instance, the following conversions take place:
+--------------------+-------------------------------+
| Resulting state | :class:`MaildirMessage` state |
+====================+===============================+
| "unseen" sequence | no ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5dd53410-c51c-4409-be82-c73c93729eba | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,837 | supabase-export-v2 | 57b16cbfc4e19847 | by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character.
When an :class:`!mboxMessage` instance is created based upon a
:class:`MaildirMessage` instance, a "From " line is generated based upon the
:class:`MaildirMessage` instance's delivery date,... | trusted_official_docs | CPython Docs | by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character.
When an :class:`!mboxMessage` instance is created based upon a
:class:`MaildirMessage` instance, a "From " line is generated based upon the
:class:`MaildirMessage` instance's delivery date,... | by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character.
When an :class:`!mboxMessage` instance is created based upon a
:class:`MaildirMessage` instance, a "From " line is generated based upon the
:class:`MaildirMessage` instance's delivery date,... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5ddcf879-cbe8-4145-b4b5-5b1353421b95 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,780 | supabase-export-v2 | d8c0cd6629bf8ac9 | state such as whether a message has been read by the user or marked as important is retained, because it applies to the message itself.
There is no requirement that :class:`!Message` instances be used to represent
messages retrieved using :class:`Mailbox` instances. In some situations, the
time and memory required to... | trusted_official_docs | CPython Docs | state such as whether a message has been read by the user or marked as important is retained, because it applies to the message itself.
There is no requirement that :class:`!Message` instances be used to represent
messages retrieved using :class:`Mailbox` instances. In some situations, the
time and memory required to... | state such as whether a message has been read by the user or marked as important is retained, because it applies to the message itself.
There is no requirement that :class:`!Message` instances be used to represent
messages retrieved using :class:`Mailbox` instances. In some situations, the
time and memory required to... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5e700b6d-aa6e-4c57-a878-b3e57c78649a | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,618 | supabase-export-v2 | 6453774ea45513d8 | If *create* is ``True`` and the *dirname* path exists, it will be treated as an existing maildir without attempting to verify its directory layout.
It is for historical reasons that *dirname* is named as such rather than *path*. | trusted_official_docs | CPython Docs | If *create* is ``True`` and the *dirname* path exists, it will be treated as an existing maildir without attempting to verify its directory layout.
It is for historical reasons that *dirname* is named as such rather than *path*. | If *create* is ``True`` and the *dirname* path exists, it will be treated as an existing maildir without attempting to verify its directory layout.
It is for historical reasons that *dirname* is named as such rather than *path*. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
61751c4b-5b2e-41bb-8049-d8de29bbd231 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,779 | supabase-export-v2 | faab3d10fc4f0a46 | an :rfc:`5322`\ -compliant message, which is read and parsed. Files should be open in binary mode, but text mode files are accepted for backward compatibility.
The format-specific state and behaviors offered by subclasses vary, but in
general it is only the properties that are not specific to a particular
mailbox tha... | trusted_official_docs | CPython Docs | an :rfc:`5322`\ -compliant message, which is read and parsed. Files should be open in binary mode, but text mode files are accepted for backward compatibility.
The format-specific state and behaviors offered by subclasses vary, but in
general it is only the properties that are not specific to a particular
mailbox tha... | an :rfc:`5322`\ -compliant message, which is read and parsed. Files should be open in binary mode, but text mode files are accepted for backward compatibility.
The format-specific state and behaviors offered by subclasses vary, but in
general it is only the properties that are not specific to a particular
mailbox tha... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
639b5396-2c13-4b4a-be4d-cb151f0438fb | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,944 | supabase-export-v2 | 829f73f7b788f994 | boxes = {name: mailbox.mbox('~/email/%s' % name) for name in list_names} inbox = mailbox.Maildir('~/Maildir', factory=None)
for key in inbox.iterkeys():
try:
message = inbox[key]
except email.errors.MessageParseError:
continue # The message is malformed. Just leave it. | trusted_official_docs | CPython Docs | boxes = {name: mailbox.mbox('~/email/%s' % name) for name in list_names} inbox = mailbox.Maildir('~/Maildir', factory=None)
for key in inbox.iterkeys():
try:
message = inbox[key]
except email.errors.MessageParseError:
continue # The message is malformed. Just leave it. | boxes = {name: mailbox.mbox('~/email/%s' % name) for name in list_names} inbox = mailbox.Maildir('~/Maildir', factory=None)
for key in inbox.iterkeys():
try:
message = inbox[key]
except email.errors.MessageParseError:
continue # The message is malformed. Just leave it. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
66d58b44-69bf-43b2-a4fa-1ff1e5f81cb4 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,947 | supabase-export-v2 | e27ed9f7041b2e66 | removing original. # If there's a crash, you might duplicate a message, but # that's better than losing a message completely. box.lock() box.add(message) box.flush() box.unlock()
# Remove original message
inbox.lock()
inbox.discard(key)
inbox.flush()
inbox.unlock()
break # Found destination, so stop looking. | trusted_official_docs | CPython Docs | removing original. # If there's a crash, you might duplicate a message, but # that's better than losing a message completely. box.lock() box.add(message) box.flush() box.unlock()
# Remove original message
inbox.lock()
inbox.discard(key)
inbox.flush()
inbox.unlock()
break # Found destination, so stop looking. | removing original. # If there's a crash, you might duplicate a message, but # that's better than losing a message completely. box.lock() box.add(message) box.flush() box.unlock()
# Remove original message
inbox.lock()
inbox.discard(key)
inbox.flush()
inbox.unlock()
break # Found destination, so stop looking. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6a4967e4-8d8d-448c-b719-d8933b03f3f7 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,812 | supabase-export-v2 | 12f4a0866903cbf4 | +--------------------+----------------------------------------------+ | R flag | A flag | +--------------------+----------------------------------------------+ | S flag | R flag | +--------------------+----------------------------------------------+ | T flag | D flag | +--------------------+----------------------------... | trusted_official_docs | CPython Docs | +--------------------+----------------------------------------------+ | R flag | A flag | +--------------------+----------------------------------------------+ | S flag | R flag | +--------------------+----------------------------------------------+ | T flag | D flag | +--------------------+----------------------------... | +--------------------+----------------------------------------------+ | R flag | A flag | +--------------------+----------------------------------------------+ | S flag | R flag | +--------------------+----------------------------------------------+ | T flag | D flag | +--------------------+----------------------------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6a8fe802-37c8-4b11-924c-6a60442dddbc | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,581 | supabase-export-v2 | 8a6cd7c2757a81a1 | .. method:: get_message(key)
Return a representation of the message corresponding to *key* as an
instance of the appropriate format-specific :class:`Message` subclass, or
raise a :exc:`KeyError` exception if no such message exists. | trusted_official_docs | CPython Docs | .. method:: get_message(key)
Return a representation of the message corresponding to *key* as an
instance of the appropriate format-specific :class:`Message` subclass, or
raise a :exc:`KeyError` exception if no such message exists. | .. method:: get_message(key)
Return a representation of the message corresponding to *key* as an
instance of the appropriate format-specific :class:`Message` subclass, or
raise a :exc:`KeyError` exception if no such message exists. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
6ad63dc0-7f32-433a-a212-8e365f091d84 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,693 | supabase-export-v2 | 7a9b441615e09675 | .. method:: get_string(key, from_=False)
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is False, the first line of the file is dropped. | trusted_official_docs | CPython Docs | .. method:: get_string(key, from_=False)
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is False, the first line of the file is dropped. | .. method:: get_string(key, from_=False)
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is False, the first line of the file is dropped. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
70f784de-d919-4840-8cf0-3559b5e8f290 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,844 | supabase-export-v2 | 3b0afcc5624805ed | When a :class:`!mboxMessage` instance is created based upon an :class:`MMDFMessage` instance, the "From " line is copied and all flags directly correspond:
+-----------------+----------------------------+
| Resulting state | :class:`MMDFMessage` state |
+=================+============================+
| R flag | R flag... | trusted_official_docs | CPython Docs | When a :class:`!mboxMessage` instance is created based upon an :class:`MMDFMessage` instance, the "From " line is copied and all flags directly correspond:
+-----------------+----------------------------+
| Resulting state | :class:`MMDFMessage` state |
+=================+============================+
| R flag | R flag... | When a :class:`!mboxMessage` instance is created based upon an :class:`MMDFMessage` instance, the "From " line is copied and all flags directly correspond:
+-----------------+----------------------------+
| Resulting state | :class:`MMDFMessage` state |
+=================+============================+
| R flag | R flag... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
71a68b41-cce0-4563-bfc1-9fdb6e1a26a3 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,704 | supabase-export-v2 | d6c36dc7a91fbe84 | If *factory* is ``None``, :class:`MHMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
MH is a directory-based mailbox format invented for the MH Message Handling
System, a mail user agent. Each message in an MH mailbox resides in its own
file... | trusted_official_docs | CPython Docs | If *factory* is ``None``, :class:`MHMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
MH is a directory-based mailbox format invented for the MH Message Handling
System, a mail user agent. Each message in an MH mailbox resides in its own
file... | If *factory* is ``None``, :class:`MHMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
MH is a directory-based mailbox format invented for the MH Message Handling
System, a mail user agent. Each message in an MH mailbox resides in its own
file... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
729e8ba5-2501-4a12-8c53-bcd4b15b58c0 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,560 | supabase-export-v2 | 69bb4b7b2e6438dc | Delete the message corresponding to *key* from the mailbox.
If no such message exists, a :exc:`KeyError` exception is raised if the
method was called as :meth:`remove` or :meth:`__delitem__` but no
exception is raised if the method was called as :meth:`discard`. The
behavior of :meth:`discard` may be preferred if th... | trusted_official_docs | CPython Docs | Delete the message corresponding to *key* from the mailbox.
If no such message exists, a :exc:`KeyError` exception is raised if the
method was called as :meth:`remove` or :meth:`__delitem__` but no
exception is raised if the method was called as :meth:`discard`. The
behavior of :meth:`discard` may be preferred if th... | Delete the message corresponding to *key* from the mailbox.
If no such message exists, a :exc:`KeyError` exception is raised if the
method was called as :meth:`remove` or :meth:`__delitem__` but no
exception is raised if the method was called as :meth:`discard`. The
behavior of :meth:`discard` may be preferred if th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
737fc498-9e86-4e44-a263-cee95bc5ea2a | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,864 | supabase-export-v2 | 11d3bd308b4410b3 | | "unseen" sequence | no R flag | +--------------------+----------------------------------------------+ | "replied" sequence | A flag | +--------------------+----------------------------------------------+ | "flagged" sequence | F flag | +--------------------+----------------------------------------------+
When an :cla... | trusted_official_docs | CPython Docs | | "unseen" sequence | no R flag | +--------------------+----------------------------------------------+ | "replied" sequence | A flag | +--------------------+----------------------------------------------+ | "flagged" sequence | F flag | +--------------------+----------------------------------------------+
When an :cla... | | "unseen" sequence | no R flag | +--------------------+----------------------------------------------+ | "replied" sequence | A flag | +--------------------+----------------------------------------------+ | "flagged" sequence | F flag | +--------------------+----------------------------------------------+
When an :cla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
77284c02-b564-4a08-8d43-5ce49c45961b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,830 | supabase-export-v2 | 7d0f0cae99bbfa72 | .. method:: get_flags()
Return a string specifying the flags that are currently set. If the
message complies with the conventional format, the result is the
concatenation in the following order of zero or one occurrence of each of
``'R'``, ``'O'``, ``'D'``, ``'F'``, and ``'A'``. | trusted_official_docs | CPython Docs | .. method:: get_flags()
Return a string specifying the flags that are currently set. If the
message complies with the conventional format, the result is the
concatenation in the following order of zero or one occurrence of each of
``'R'``, ``'O'``, ``'D'``, ``'F'``, and ``'A'``. | .. method:: get_flags()
Return a string specifying the flags that are currently set. If the
message complies with the conventional format, the result is the
concatenation in the following order of zero or one occurrence of each of
``'R'``, ``'O'``, ``'D'``, ``'F'``, and ``'A'``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
784d263b-ad08-42f6-bbcf-b735c979f1a0 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,762 | supabase-export-v2 | 3694e2106295704a | If *factory* is ``None``, :class:`MMDFMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
MMDF is a single-file mailbox format invented for the Multichannel Memorandum
Distribution Facility, a mail transfer agent. Each message is in the same
fo... | trusted_official_docs | CPython Docs | If *factory* is ``None``, :class:`MMDFMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
MMDF is a single-file mailbox format invented for the Multichannel Memorandum
Distribution Facility, a mail transfer agent. Each message is in the same
fo... | If *factory* is ``None``, :class:`MMDFMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
MMDF is a single-file mailbox format invented for the Multichannel Memorandum
Distribution Facility, a mail transfer agent. Each message is in the same
fo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
79bf398b-bae4-471c-93ca-f286d6e5d303 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,786 | supabase-export-v2 | d5440166648a1251 | a list of standardized flags (e.g., "2,FR") or it may contain "1," followed by so-called experimental information. Standard flags for Maildir messages are as follows:
+------+---------+--------------------------------+
| Flag | Meaning | Explanation |
+======+=========+================================+
| D | Draft |... | trusted_official_docs | CPython Docs | a list of standardized flags (e.g., "2,FR") or it may contain "1," followed by so-called experimental information. Standard flags for Maildir messages are as follows:
+------+---------+--------------------------------+
| Flag | Meaning | Explanation |
+======+=========+================================+
| D | Draft |... | a list of standardized flags (e.g., "2,FR") or it may contain "1," followed by so-called experimental information. Standard flags for Maildir messages are as follows:
+------+---------+--------------------------------+
| Flag | Meaning | Explanation |
+======+=========+================================+
| D | Draft |... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7a0a3414-e455-476c-a43c-d6387eec5290 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,871 | supabase-export-v2 | d44760b551c1075a | Certain message labels, called :dfn:`attributes`, are defined by convention to have special meanings. The attributes are as follows:
+-----------+------------------------------------------+
| Label | Explanation |
+===========+==========================================+
| unseen | Not read, but previously detected b... | trusted_official_docs | CPython Docs | Certain message labels, called :dfn:`attributes`, are defined by convention to have special meanings. The attributes are as follows:
+-----------+------------------------------------------+
| Label | Explanation |
+===========+==========================================+
| unseen | Not read, but previously detected b... | Certain message labels, called :dfn:`attributes`, are defined by convention to have special meanings. The attributes are as follows:
+-----------+------------------------------------------+
| Label | Explanation |
+===========+==========================================+
| unseen | Not read, but previously detected b... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b882e55-f8e7-4aed-b575-d35d46a405ac | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,899 | supabase-export-v2 | 28a98e51506e93c5 | in an initial line beginning with "From ". Likewise, flags that indicate the state of the message are typically stored in :mailheader:`Status` and :mailheader:`X-Status` headers.
Conventional flags for MMDF messages are identical to those of mbox message
and are as follows: | trusted_official_docs | CPython Docs | in an initial line beginning with "From ". Likewise, flags that indicate the state of the message are typically stored in :mailheader:`Status` and :mailheader:`X-Status` headers.
Conventional flags for MMDF messages are identical to those of mbox message
and are as follows: | in an initial line beginning with "From ". Likewise, flags that indicate the state of the message are typically stored in :mailheader:`Status` and :mailheader:`X-Status` headers.
Conventional flags for MMDF messages are identical to those of mbox message
and are as follows: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7bf735d9-1154-4d51-a353-e6a5d070a331 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,889 | supabase-export-v2 | 3fc4f7481cae2746 | When a :class:`!BabylMessage` instance is created based upon a :class:`MaildirMessage` instance, the following conversions take place:
+-------------------+-------------------------------+
| Resulting state | :class:`MaildirMessage` state |
+===================+===============================+
| "unseen" label | no S f... | trusted_official_docs | CPython Docs | When a :class:`!BabylMessage` instance is created based upon a :class:`MaildirMessage` instance, the following conversions take place:
+-------------------+-------------------------------+
| Resulting state | :class:`MaildirMessage` state |
+===================+===============================+
| "unseen" label | no S f... | When a :class:`!BabylMessage` instance is created based upon a :class:`MaildirMessage` instance, the following conversions take place:
+-------------------+-------------------------------+
| Resulting state | :class:`MaildirMessage` state |
+===================+===============================+
| "unseen" label | no S f... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c341857-f921-4d06-af4d-ccfcd94d0392 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,890 | supabase-export-v2 | 4708777395bef74d | +-------------------+-------------------------------+ | "deleted" label | T flag | +-------------------+-------------------------------+ | "answered" label | R flag | +-------------------+-------------------------------+ | "forwarded" label | P flag | +-------------------+-------------------------------+
When a :class:... | trusted_official_docs | CPython Docs | +-------------------+-------------------------------+ | "deleted" label | T flag | +-------------------+-------------------------------+ | "answered" label | R flag | +-------------------+-------------------------------+ | "forwarded" label | P flag | +-------------------+-------------------------------+
When a :class:... | +-------------------+-------------------------------+ | "deleted" label | T flag | +-------------------+-------------------------------+ | "answered" label | R flag | +-------------------+-------------------------------+ | "forwarded" label | P flag | +-------------------+-------------------------------+
When a :class:... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7e11bfde-3cdd-4f9c-88b4-76eba8cd8ec0 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,579 | supabase-export-v2 | c60ee9325f9fcfb4 | .. method:: get(key, default=None) __getitem__(key)
Return a representation of the message corresponding to *key*. If no such
message exists, *default* is returned if the method was called as
:meth:`get` and a :exc:`KeyError` exception is raised if the method was
called as :meth:`!__getitem__`. The message is repres... | trusted_official_docs | CPython Docs | .. method:: get(key, default=None) __getitem__(key)
Return a representation of the message corresponding to *key*. If no such
message exists, *default* is returned if the method was called as
:meth:`get` and a :exc:`KeyError` exception is raised if the method was
called as :meth:`!__getitem__`. The message is repres... | .. method:: get(key, default=None) __getitem__(key)
Return a representation of the message corresponding to *key*. If no such
message exists, *default* is returned if the method was called as
:meth:`get` and a :exc:`KeyError` exception is raised if the method was
called as :meth:`!__getitem__`. The message is repres... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7f18d51c-975d-47be-9963-80bddac7f64e | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,546 | supabase-export-v2 | 663b14ecd46599e6 | that :class:`!Mailbox` instance. A key continues to identify a message even if the corresponding message is modified, such as by replacing it with another message.
Messages may be added to a :class:`!Mailbox` instance using the set-like
method :meth:`add` and removed using a ``del`` statement or the set-like
methods ... | trusted_official_docs | CPython Docs | that :class:`!Mailbox` instance. A key continues to identify a message even if the corresponding message is modified, such as by replacing it with another message.
Messages may be added to a :class:`!Mailbox` instance using the set-like
method :meth:`add` and removed using a ``del`` statement or the set-like
methods ... | that :class:`!Mailbox` instance. A key continues to identify a message even if the corresponding message is modified, such as by replacing it with another message.
Messages may be added to a :class:`!Mailbox` instance using the set-like
method :meth:`add` and removed using a ``del`` statement or the set-like
methods ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7f8af441-7add-40db-ad02-34393b8f543b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,750 | supabase-export-v2 | 90df4c218fc41504 | the mailbox rather than consulting the list of labels in the Babyl options section, but the Babyl section is updated whenever the mailbox is modified.
Some :class:`Mailbox` methods implemented by :class:`!Babyl` deserve special
remarks: | trusted_official_docs | CPython Docs | the mailbox rather than consulting the list of labels in the Babyl options section, but the Babyl section is updated whenever the mailbox is modified.
Some :class:`Mailbox` methods implemented by :class:`!Babyl` deserve special
remarks: | the mailbox rather than consulting the list of labels in the Babyl options section, but the Babyl section is updated whenever the mailbox is modified.
Some :class:`Mailbox` methods implemented by :class:`!Babyl` deserve special
remarks: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
813264db-9ef7-4c56-a049-ca765e4a92a2 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,639 | supabase-export-v2 | 67bfb7e561f10c9e | .. method:: get_flags(key)
Return as a string the flags that are set on the message
corresponding to *key*. This is the same as ``get_message(key).get_flags()`` but much
faster, because it does not open the message file. Use this method when iterating over the keys to determine which
messages are interesting to get. | trusted_official_docs | CPython Docs | .. method:: get_flags(key)
Return as a string the flags that are set on the message
corresponding to *key*. This is the same as ``get_message(key).get_flags()`` but much
faster, because it does not open the message file. Use this method when iterating over the keys to determine which
messages are interesting to get. | .. method:: get_flags(key)
Return as a string the flags that are set on the message
corresponding to *key*. This is the same as ``get_message(key).get_flags()`` but much
faster, because it does not open the message file. Use this method when iterating over the keys to determine which
messages are interesting to get. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8211741a-9f46-41f4-9434-ea66a0cab292 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,928 | supabase-export-v2 | a00b0bf67089b291 | .. exception:: NoSuchMailboxError()
Raised when a mailbox is expected but is not found, such as when instantiating a
:class:`Mailbox` subclass with a path that does not exist (and with the *create*
parameter set to ``False``), or when opening a folder that does not exist. | trusted_official_docs | CPython Docs | .. exception:: NoSuchMailboxError()
Raised when a mailbox is expected but is not found, such as when instantiating a
:class:`Mailbox` subclass with a path that does not exist (and with the *create*
parameter set to ``False``), or when opening a folder that does not exist. | .. exception:: NoSuchMailboxError()
Raised when a mailbox is expected but is not found, such as when instantiating a
:class:`Mailbox` subclass with a path that does not exist (and with the *create*
parameter set to ``False``), or when opening a folder that does not exist. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8213e768-4e00-4e4e-bedb-0b5247eb3e1d | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,921 | supabase-export-v2 | 662cc91276aa918e | +-------------------+-----------------------------+ | O flag | "unseen" label | +-------------------+-----------------------------+ | D flag | "deleted" label | +-------------------+-----------------------------+ | A flag | "answered" label | +-------------------+-----------------------------+
When an :class:`!MMDFMess... | trusted_official_docs | CPython Docs | +-------------------+-----------------------------+ | O flag | "unseen" label | +-------------------+-----------------------------+ | D flag | "deleted" label | +-------------------+-----------------------------+ | A flag | "answered" label | +-------------------+-----------------------------+
When an :class:`!MMDFMess... | +-------------------+-----------------------------+ | O flag | "unseen" label | +-------------------+-----------------------------+ | D flag | "deleted" label | +-------------------+-----------------------------+ | A flag | "answered" label | +-------------------+-----------------------------+
When an :class:`!MMDFMess... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
83fd32bf-41f0-4998-aa04-581846c5f4a5 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,920 | supabase-export-v2 | 3b2b785e5520cbdd | When an :class:`!MMDFMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+===================+=============================+
| R flag and O flag | no "unseen"... | trusted_official_docs | CPython Docs | When an :class:`!MMDFMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+===================+=============================+
| R flag and O flag | no "unseen"... | When an :class:`!MMDFMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+===================+=============================+
| R flag and O flag | no "unseen"... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
855d153a-1984-408f-8764-9d6cea014241 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,590 | supabase-export-v2 | dfeeb649135a4f51 | .. note::
Unlike other representations of messages,
:term:`file-like <file-like object>` representations are not
necessarily independent of the :class:`!Mailbox` instance that
created them or of the underlying mailbox. More specific documentation
is provided by each subclass. | trusted_official_docs | CPython Docs | .. note::
Unlike other representations of messages,
:term:`file-like <file-like object>` representations are not
necessarily independent of the :class:`!Mailbox` instance that
created them or of the underlying mailbox. More specific documentation
is provided by each subclass. | .. note::
Unlike other representations of messages,
:term:`file-like <file-like object>` representations are not
necessarily independent of the :class:`!Mailbox` instance that
created them or of the underlying mailbox. More specific documentation
is provided by each subclass. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8abde318-152e-4355-8ce5-505edc7191dd | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,569 | supabase-export-v2 | d15efc48ef15f96c | .. method:: itervalues() __iter__()
Return an :term:`iterator` over representations of all messages. The messages are represented
as instances of the appropriate format-specific :class:`Message` subclass
unless a custom message factory was specified when the :class:`!Mailbox`
instance was initialized. | trusted_official_docs | CPython Docs | .. method:: itervalues() __iter__()
Return an :term:`iterator` over representations of all messages. The messages are represented
as instances of the appropriate format-specific :class:`Message` subclass
unless a custom message factory was specified when the :class:`!Mailbox`
instance was initialized. | .. method:: itervalues() __iter__()
Return an :term:`iterator` over representations of all messages. The messages are represented
as instances of the appropriate format-specific :class:`Message` subclass
unless a custom message factory was specified when the :class:`!Mailbox`
instance was initialized. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8ed68035-f848-4175-827b-5099cf14247c | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,575 | supabase-export-v2 | aa471bb869e3cd75 | .. method:: iteritems()
Return an :term:`iterator` over (*key*, *message*) pairs, where *key* is
a key and *message* is a message representation. The messages are
represented as instances of the appropriate format-specific
:class:`Message` subclass unless a custom message factory was specified
when the :class:`!Mai... | trusted_official_docs | CPython Docs | .. method:: iteritems()
Return an :term:`iterator` over (*key*, *message*) pairs, where *key* is
a key and *message* is a message representation. The messages are
represented as instances of the appropriate format-specific
:class:`Message` subclass unless a custom message factory was specified
when the :class:`!Mai... | .. method:: iteritems()
Return an :term:`iterator` over (*key*, *message*) pairs, where *key* is
a key and *message* is a message representation. The messages are
represented as instances of the appropriate format-specific
:class:`Message` subclass unless a custom message factory was specified
when the :class:`!Mai... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8f588411-3de1-40c8-8ea6-db9feca71f60 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,548 | supabase-export-v2 | 4cbc35db77f91335 | a :class:`!Mailbox` instance, the provided message representation's contents are copied. In neither case is a reference to the message representation kept by the :class:`!Mailbox` instance.
The default :class:`!Mailbox` :term:`iterator` iterates over message
representations, not keys as the default :class:`dictionary ... | trusted_official_docs | CPython Docs | a :class:`!Mailbox` instance, the provided message representation's contents are copied. In neither case is a reference to the message representation kept by the :class:`!Mailbox` instance.
The default :class:`!Mailbox` :term:`iterator` iterates over message
representations, not keys as the default :class:`dictionary ... | a :class:`!Mailbox` instance, the provided message representation's contents are copied. In neither case is a reference to the message representation kept by the :class:`!Mailbox` instance.
The default :class:`!Mailbox` :term:`iterator` iterates over message
representations, not keys as the default :class:`dictionary ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8ffec1b0-6c84-450c-8847-dc7ab51defaf | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,684 | supabase-export-v2 | fa95d9a96973ca3c | If *factory* is ``None``, :class:`mboxMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
The mbox format is the classic format for storing mail on Unix systems. All
messages in an mbox mailbox are stored in a single file with the beginning of
... | trusted_official_docs | CPython Docs | If *factory* is ``None``, :class:`mboxMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
The mbox format is the classic format for storing mail on Unix systems. All
messages in an mbox mailbox are stored in a single file with the beginning of
... | If *factory* is ``None``, :class:`mboxMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
The mbox format is the classic format for storing mail on Unix systems. All
messages in an mbox mailbox are stored in a single file with the beginning of
... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
931c0744-bf7a-4956-a9a8-83b8a0da34e2 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,851 | supabase-export-v2 | 9d2b68186ad7f3df | | Not read, but previously detected by MUA | +----------+------------------------------------------+ | replied | Replied to | +----------+------------------------------------------+ | flagged | Marked as important | +----------+------------------------------------------+
:class:`!MHMessage` instances offer the followin... | trusted_official_docs | CPython Docs | | Not read, but previously detected by MUA | +----------+------------------------------------------+ | replied | Replied to | +----------+------------------------------------------+ | flagged | Marked as important | +----------+------------------------------------------+
:class:`!MHMessage` instances offer the followin... | | Not read, but previously detected by MUA | +----------+------------------------------------------+ | replied | Replied to | +----------+------------------------------------------+ | flagged | Marked as important | +----------+------------------------------------------+
:class:`!MHMessage` instances offer the followin... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
93f7c4fa-9252-4485-b166-91416bec9ee9 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,698 | supabase-export-v2 | a1f10c7d1402dedb | `mbox man page from tin <http://www.tin.org/bin/man.cgi?section=5&topic=mbox>`_ A specification of the format, with details on locking.
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_
An argument for using the original mbox format rather than a v... | trusted_official_docs | CPython Docs | `mbox man page from tin <http://www.tin.org/bin/man.cgi?section=5&topic=mbox>`_ A specification of the format, with details on locking.
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_
An argument for using the original mbox format rather than a v... | `mbox man page from tin <http://www.tin.org/bin/man.cgi?section=5&topic=mbox>`_ A specification of the format, with details on locking.
`Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_
An argument for using the original mbox format rather than a v... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
962627d1-af21-4d8d-8053-f6a114089590 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,832 | supabase-export-v2 | a055661f8c26db10 | .. method:: set_flags(flags)
Set the flags specified by *flags* and unset all others. Parameter *flags*
should be the concatenation in any order of zero or more occurrences of
each of ``'R'``, ``'O'``, ``'D'``, ``'F'``, and ``'A'``. | trusted_official_docs | CPython Docs | .. method:: set_flags(flags)
Set the flags specified by *flags* and unset all others. Parameter *flags*
should be the concatenation in any order of zero or more occurrences of
each of ``'R'``, ``'O'``, ``'D'``, ``'F'``, and ``'A'``. | .. method:: set_flags(flags)
Set the flags specified by *flags* and unset all others. Parameter *flags*
should be the concatenation in any order of zero or more occurrences of
each of ``'R'``, ``'O'``, ``'D'``, ``'F'``, and ``'A'``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
970a676a-358d-4f99-baa8-4265557dfb4f | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,663 | supabase-export-v2 | 2232bdad094acdcc | but faster, because it does not open the message file.
If you do have a :class:`MaildirMessage` object, use
its :meth:`~MaildirMessage.set_info` method instead, because
changes made with this mailbox method will not be visible to the
message object's method, :meth:`~MaildirMessage.get_info`. | trusted_official_docs | CPython Docs | but faster, because it does not open the message file.
If you do have a :class:`MaildirMessage` object, use
its :meth:`~MaildirMessage.set_info` method instead, because
changes made with this mailbox method will not be visible to the
message object's method, :meth:`~MaildirMessage.get_info`. | but faster, because it does not open the message file.
If you do have a :class:`MaildirMessage` object, use
its :meth:`~MaildirMessage.set_info` method instead, because
changes made with this mailbox method will not be visible to the
message object's method, :meth:`~MaildirMessage.get_info`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9921c822-c09b-4fa8-ad17-7875087ab92c | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,688 | supabase-export-v2 | 28868779b980b9d2 | .. method:: get_bytes(key, from_=False)
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is False, the first line of the file is dropped. | trusted_official_docs | CPython Docs | .. method:: get_bytes(key, from_=False)
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is False, the first line of the file is dropped. | .. method:: get_bytes(key, from_=False)
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is False, the first line of the file is dropped. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
99b289e4-33c9-40a8-94b1-9a13cb76c704 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,749 | supabase-export-v2 | d615459cfe2fb774 | .. note::
The actual messages are inspected to determine which labels exist in
the mailbox rather than consulting the list of labels in the Babyl
options section, but the Babyl section is updated whenever the mailbox
is modified. | trusted_official_docs | CPython Docs | .. note::
The actual messages are inspected to determine which labels exist in
the mailbox rather than consulting the list of labels in the Babyl
options section, but the Babyl section is updated whenever the mailbox
is modified. | .. note::
The actual messages are inspected to determine which labels exist in
the mailbox rather than consulting the list of labels in the Babyl
options section, but the Babyl section is updated whenever the mailbox
is modified. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b52e4b3-6765-4614-81c2-d2a7e8f2471b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,939 | supabase-export-v2 | 32b1e7d173560693 | To copy all mail from a Babyl mailbox to an MH mailbox, converting all of the format-specific information that can be converted::
import mailbox
destination = mailbox.MH('~/Mail')
destination.lock()
for message in mailbox.Babyl('~/RMAIL'):
destination.add(mailbox.MHMessage(message))
destination.flush()
destinatio... | trusted_official_docs | CPython Docs | To copy all mail from a Babyl mailbox to an MH mailbox, converting all of the format-specific information that can be converted::
import mailbox
destination = mailbox.MH('~/Mail')
destination.lock()
for message in mailbox.Babyl('~/RMAIL'):
destination.add(mailbox.MHMessage(message))
destination.flush()
destinatio... | To copy all mail from a Babyl mailbox to an MH mailbox, converting all of the format-specific information that can be converted::
import mailbox
destination = mailbox.MH('~/Mail')
destination.lock()
for message in mailbox.Babyl('~/RMAIL'):
destination.add(mailbox.MHMessage(message))
destination.flush()
destinatio... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9d82f7ee-07b5-46c9-a30c-2caf8dbacf3b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,602 | supabase-export-v2 | 9fd46e0f4aa38dd5 | .. method:: update(arg)
Parameter *arg* should be a *key*-to-*message* mapping or an iterable of
(*key*, *message*) pairs. Updates the mailbox so that, for each given
*key* and *message*, the message corresponding to *key* is set to
*message* as if by using :meth:`__setitem__`. As with :meth:`__setitem__`,
each *ke... | trusted_official_docs | CPython Docs | .. method:: update(arg)
Parameter *arg* should be a *key*-to-*message* mapping or an iterable of
(*key*, *message*) pairs. Updates the mailbox so that, for each given
*key* and *message*, the message corresponding to *key* is set to
*message* as if by using :meth:`__setitem__`. As with :meth:`__setitem__`,
each *ke... | .. method:: update(arg)
Parameter *arg* should be a *key*-to-*message* mapping or an iterable of
(*key*, *message*) pairs. Updates the mailbox so that, for each given
*key* and *message*, the message corresponding to *key* is set to
*message* as if by using :meth:`__setitem__`. As with :meth:`__setitem__`,
each *ke... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a38db231-ba30-4f3c-9723-27669a967094 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,836 | supabase-export-v2 | 4198acc6ad74463f | .. method:: remove_flag(flag)
Unset the flag(s) specified by *flag* without changing other flags. To
remove more than one flag at a time, *flag* may be a string of more than
one character. | trusted_official_docs | CPython Docs | .. method:: remove_flag(flag)
Unset the flag(s) specified by *flag* without changing other flags. To
remove more than one flag at a time, *flag* may be a string of more than
one character. | .. method:: remove_flag(flag)
Unset the flag(s) specified by *flag* without changing other flags. To
remove more than one flag at a time, *flag* may be a string of more than
one character. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a4521ffb-7475-44b4-8b59-6f2f61140f87 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,840 | supabase-export-v2 | d3b84a16498b4b18 | When an :class:`!mboxMessage` instance is created based upon an :class:`MHMessage` instance, the following conversions take place:
+-------------------+--------------------------+
| Resulting state | :class:`MHMessage` state |
+===================+==========================+
| R flag and O flag | no "unseen" sequence |... | trusted_official_docs | CPython Docs | When an :class:`!mboxMessage` instance is created based upon an :class:`MHMessage` instance, the following conversions take place:
+-------------------+--------------------------+
| Resulting state | :class:`MHMessage` state |
+===================+==========================+
| R flag and O flag | no "unseen" sequence |... | When an :class:`!mboxMessage` instance is created based upon an :class:`MHMessage` instance, the following conversions take place:
+-------------------+--------------------------+
| Resulting state | :class:`MHMessage` state |
+===================+==========================+
| R flag and O flag | no "unseen" sequence |... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a479b7f7-252b-49f7-8824-d7eb2af296f2 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,870 | supabase-export-v2 | 32fadf6c02240860 | A message with Babyl-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Certain message labels, called :dfn:`attributes`, are defined by convention
to have special meanings. The attributes are as follows: | trusted_official_docs | CPython Docs | A message with Babyl-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Certain message labels, called :dfn:`attributes`, are defined by convention
to have special meanings. The attributes are as follows: | A message with Babyl-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Certain message labels, called :dfn:`attributes`, are defined by convention
to have special meanings. The attributes are as follows: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a6490f63-e292-4378-8a13-a9740b598c18 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,862 | supabase-export-v2 | 672287ef05e373f3 | | "unseen" sequence | no S flag | +--------------------+-------------------------------+ | "replied" sequence | R flag | +--------------------+-------------------------------+ | "flagged" sequence | F flag | +--------------------+-------------------------------+
When an :class:`!MHMessage` instance is created based upo... | trusted_official_docs | CPython Docs | | "unseen" sequence | no S flag | +--------------------+-------------------------------+ | "replied" sequence | R flag | +--------------------+-------------------------------+ | "flagged" sequence | F flag | +--------------------+-------------------------------+
When an :class:`!MHMessage` instance is created based upo... | | "unseen" sequence | no S flag | +--------------------+-------------------------------+ | "replied" sequence | R flag | +--------------------+-------------------------------+ | "flagged" sequence | F flag | +--------------------+-------------------------------+
When an :class:`!MHMessage` instance is created based upo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a6953056-ec7b-4d18-bb33-a8d0086ca4c6 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,917 | supabase-export-v2 | 6e9e037a56a6425e | +-----------------+-------------------------------+ | D flag | T flag | +-----------------+-------------------------------+ | F flag | F flag | +-----------------+-------------------------------+ | A flag | R flag | +-----------------+-------------------------------+
When an :class:`!MMDFMessage` instance is created ba... | trusted_official_docs | CPython Docs | +-----------------+-------------------------------+ | D flag | T flag | +-----------------+-------------------------------+ | F flag | F flag | +-----------------+-------------------------------+ | A flag | R flag | +-----------------+-------------------------------+
When an :class:`!MMDFMessage` instance is created ba... | +-----------------+-------------------------------+ | D flag | T flag | +-----------------+-------------------------------+ | F flag | F flag | +-----------------+-------------------------------+ | A flag | R flag | +-----------------+-------------------------------+
When an :class:`!MMDFMessage` instance is created ba... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
aae9334c-035b-445d-a548-90862955a2b1 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,552 | supabase-export-v2 | 507cb0607206d621 | calls :meth:`lock` when the context is entered, returns the mailbox object as the context object, and at context end calls :meth:`close`, thereby releasing the lock.
.. versionchanged:: 3.15
Support for the :keyword:`with` statement was added. | trusted_official_docs | CPython Docs | calls :meth:`lock` when the context is entered, returns the mailbox object as the context object, and at context end calls :meth:`close`, thereby releasing the lock.
.. versionchanged:: 3.15
Support for the :keyword:`with` statement was added. | calls :meth:`lock` when the context is entered, returns the mailbox object as the context object, and at context end calls :meth:`close`, thereby releasing the lock.
.. versionchanged:: 3.15
Support for the :keyword:`with` statement was added. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ac2861ce-ee95-4385-bb45-68fdc42f9d99 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,865 | supabase-export-v2 | 6bbbb690e3eb0ce1 | When an :class:`!MHMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+--------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+====================+=============================+
| "unseen" sequence | "unseen" la... | trusted_official_docs | CPython Docs | When an :class:`!MHMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+--------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+====================+=============================+
| "unseen" sequence | "unseen" la... | When an :class:`!MHMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+--------------------+-----------------------------+
| Resulting state | :class:`BabylMessage` state |
+====================+=============================+
| "unseen" sequence | "unseen" la... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
adefe4e6-b2e1-448a-ad55-57c8ba84d362 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,915 | supabase-export-v2 | 4e8ace85cfa6f59d | by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character.
When an :class:`!MMDFMessage` instance is created based upon a
:class:`MaildirMessage` instance, a "From " line is generated based upon the
:class:`MaildirMessage` instance's delivery date,... | trusted_official_docs | CPython Docs | by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character.
When an :class:`!MMDFMessage` instance is created based upon a
:class:`MaildirMessage` instance, a "From " line is generated based upon the
:class:`MaildirMessage` instance's delivery date,... | by *flag* without changing other flags. To remove more than one flag at a time, *flag* may be a string of more than one character.
When an :class:`!MMDFMessage` instance is created based upon a
:class:`MaildirMessage` instance, a "From " line is generated based upon the
:class:`MaildirMessage` instance's delivery date,... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b2d7edff-d3e4-4af2-8dea-aaaf321a2357 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,550 | supabase-export-v2 | b6251bd3fea87510 | .. warning::
Be very cautious when modifying mailboxes that might be simultaneously
changed by some other process. The safest mailbox format to use for such
tasks is :class:`Maildir`; try to avoid using single-file formats such as
:class:`mbox` for
concurrent writing. If you're modifying a mailbox, you *must* lock ... | trusted_official_docs | CPython Docs | .. warning::
Be very cautious when modifying mailboxes that might be simultaneously
changed by some other process. The safest mailbox format to use for such
tasks is :class:`Maildir`; try to avoid using single-file formats such as
:class:`mbox` for
concurrent writing. If you're modifying a mailbox, you *must* lock ... | .. warning::
Be very cautious when modifying mailboxes that might be simultaneously
changed by some other process. The safest mailbox format to use for such
tasks is :class:`Maildir`; try to avoid using single-file formats such as
:class:`mbox` for
concurrent writing. If you're modifying a mailbox, you *must* lock ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b3467671-17df-457e-9f91-d27ca4738cd5 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,919 | supabase-export-v2 | b62a2d7a21e31653 | +-------------------+--------------------------+ | O flag | "unseen" sequence | +-------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------+--------------------------+ | A flag | "replied" sequence | +-------------------+--------------------------+
When an :class:`!MMDFMessage`... | trusted_official_docs | CPython Docs | +-------------------+--------------------------+ | O flag | "unseen" sequence | +-------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------+--------------------------+ | A flag | "replied" sequence | +-------------------+--------------------------+
When an :class:`!MMDFMessage`... | +-------------------+--------------------------+ | O flag | "unseen" sequence | +-------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------+--------------------------+ | A flag | "replied" sequence | +-------------------+--------------------------+
When an :class:`!MMDFMessage`... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b3590410-7567-4ba9-ab10-8eac6bfb4f1f | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,620 | supabase-export-v2 | 6e42c91c38840b1f | common directory structure. This design allows Maildir mailboxes to be accessed and modified by multiple unrelated programs without data corruption, so file locking is unnecessary.
Maildir mailboxes contain three subdirectories, namely: :file:`tmp`,
:file:`new`, and :file:`cur`. Messages are created momentarily in the... | trusted_official_docs | CPython Docs | common directory structure. This design allows Maildir mailboxes to be accessed and modified by multiple unrelated programs without data corruption, so file locking is unnecessary.
Maildir mailboxes contain three subdirectories, namely: :file:`tmp`,
:file:`new`, and :file:`cur`. Messages are created momentarily in the... | common directory structure. This design allows Maildir mailboxes to be accessed and modified by multiple unrelated programs without data corruption, so file locking is unnecessary.
Maildir mailboxes contain three subdirectories, namely: :file:`tmp`,
:file:`new`, and :file:`cur`. Messages are created momentarily in the... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b67f7121-ab48-45fc-83c3-d6fb01c86527 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,761 | supabase-export-v2 | 0acce8a4b3720124 | .. class:: MMDF(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`MMD... | trusted_official_docs | CPython Docs | .. class:: MMDF(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`MMD... | .. class:: MMDF(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`MMD... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b7cd638b-86d4-4c65-91f2-3cf20fc1655a | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,679 | supabase-export-v2 | fabc4639b3ce748d | `maildir man page from Courier <https://www.courier-mta.org/maildir.html>`_ A specification of the format. Describes a common extension for supporting folders.
`Using maildir format <https://cr.yp.to/proto/maildir.html>`_
Notes on Maildir by its inventor. Includes an updated name-creation scheme and
details on "info"... | trusted_official_docs | CPython Docs | `maildir man page from Courier <https://www.courier-mta.org/maildir.html>`_ A specification of the format. Describes a common extension for supporting folders.
`Using maildir format <https://cr.yp.to/proto/maildir.html>`_
Notes on Maildir by its inventor. Includes an updated name-creation scheme and
details on "info"... | `maildir man page from Courier <https://www.courier-mta.org/maildir.html>`_ A specification of the format. Describes a common extension for supporting folders.
`Using maildir format <https://cr.yp.to/proto/maildir.html>`_
Notes on Maildir by its inventor. Includes an updated name-creation scheme and
details on "info"... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b8113d05-a745-4478-85b6-c0768eaed065 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,744 | supabase-export-v2 | fb484afdb6372b6c | message is indicated by the start of the next message or, in the case of the last message, a line containing a Control-Underscore (``'\037'``) character.
Messages in a Babyl mailbox have two sets of headers, original headers and
so-called visible headers. Visible headers are typically a subset of the
original headers... | trusted_official_docs | CPython Docs | message is indicated by the start of the next message or, in the case of the last message, a line containing a Control-Underscore (``'\037'``) character.
Messages in a Babyl mailbox have two sets of headers, original headers and
so-called visible headers. Visible headers are typically a subset of the
original headers... | message is indicated by the start of the next message or, in the case of the last message, a line containing a Control-Underscore (``'\037'``) character.
Messages in a Babyl mailbox have two sets of headers, original headers and
so-called visible headers. Visible headers are typically a subset of the
original headers... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b9feb2df-c533-441e-8887-f89679ebe9ce | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,650 | supabase-export-v2 | c6f977e475696d95 | by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character.
Considerations for using this method versus the message object's
:meth:`~MaildirMessage.add_flag` method are similar to
those for :meth:`set_flags`; see the discussion there. | trusted_official_docs | CPython Docs | by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character.
Considerations for using this method versus the message object's
:meth:`~MaildirMessage.add_flag` method are similar to
those for :meth:`set_flags`; see the discussion there. | by *flag* without changing other flags. To add more than one flag at a time, *flag* may be a string of more than one character.
Considerations for using this method versus the message object's
:meth:`~MaildirMessage.add_flag` method are similar to
those for :meth:`set_flags`; see the discussion there. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bc9415bc-c1f0-468a-bb7a-a512ae4c75b4 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,815 | supabase-export-v2 | a156b3956ec07a9c | When a :class:`!MaildirMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------------------+-------------------------------+
| Resulting state | :class:`BabylMessage` state |
+===============================+===============================+
| "... | trusted_official_docs | CPython Docs | When a :class:`!MaildirMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------------------+-------------------------------+
| Resulting state | :class:`BabylMessage` state |
+===============================+===============================+
| "... | When a :class:`!MaildirMessage` instance is created based upon a :class:`BabylMessage` instance, the following conversions take place:
+-------------------------------+-------------------------------+
| Resulting state | :class:`BabylMessage` state |
+===============================+===============================+
| "... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bdf1afd0-f217-4740-aa1b-fa9018bb46a6 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,683 | supabase-export-v2 | 6d8920ae9321bc1e | .. class:: mbox(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`mbo... | trusted_official_docs | CPython Docs | .. class:: mbox(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`mbo... | .. class:: mbox(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
behaves as if opened in binary mode) and returns a custom representation. If
*factory* is ``None``, :class:`mbo... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bec2e64f-2339-4898-b0e6-1903bcab233a | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,814 | supabase-export-v2 | db88f8cb50914fa7 | and S flag | no "unseen" sequence | +-------------------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------------------+--------------------------+ | R flag | "replied" sequence | +-------------------------------+--------------------------+
When a :class:`!MaildirMessage` insta... | trusted_official_docs | CPython Docs | and S flag | no "unseen" sequence | +-------------------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------------------+--------------------------+ | R flag | "replied" sequence | +-------------------------------+--------------------------+
When a :class:`!MaildirMessage` insta... | and S flag | no "unseen" sequence | +-------------------------------+--------------------------+ | F flag | "flagged" sequence | +-------------------------------+--------------------------+ | R flag | "replied" sequence | +-------------------------------+--------------------------+
When a :class:`!MaildirMessage` insta... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bfe159bc-0d17-4c01-8831-0bdbc36cdc84 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,863 | supabase-export-v2 | 7397c2775b973f00 | an :class:`!MHMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+--------------------+----------------------------------------------+
| Resulting state | :cla... | trusted_official_docs | CPython Docs | an :class:`!MHMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+--------------------+----------------------------------------------+
| Resulting state | :cla... | an :class:`!MHMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+--------------------+----------------------------------------------+
| Resulting state | :cla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c0f50dfd-541f-4fb8-96d8-f6cf8427ab99 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,600 | supabase-export-v2 | e2069ce6b5cb2dc0 | .. method:: popitem()
Return an arbitrary (*key*, *message*) pair, where *key* is a key and
*message* is a message representation, and delete the corresponding
message. If the mailbox is empty, raise a :exc:`KeyError` exception. The
message is represented as an instance of the appropriate format-specific
:class:`Me... | trusted_official_docs | CPython Docs | .. method:: popitem()
Return an arbitrary (*key*, *message*) pair, where *key* is a key and
*message* is a message representation, and delete the corresponding
message. If the mailbox is empty, raise a :exc:`KeyError` exception. The
message is represented as an instance of the appropriate format-specific
:class:`Me... | .. method:: popitem()
Return an arbitrary (*key*, *message*) pair, where *key* is a key and
*message* is a message representation, and delete the corresponding
message. If the mailbox is empty, raise a :exc:`KeyError` exception. The
message is represented as an instance of the appropriate format-specific
:class:`Me... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c155c446-28ea-4b88-956b-649caa44cfec | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,551 | supabase-export-v2 | db8446fab55f3aad | making any changes by adding or deleting a message. Failing to lock the mailbox runs the risk of losing messages or corrupting the entire mailbox.
The :class:`!Mailbox` class supports the :keyword:`with` statement. When used
as a context manager, :class:`!Mailbox` calls :meth:`lock` when the context is entered,
retur... | trusted_official_docs | CPython Docs | making any changes by adding or deleting a message. Failing to lock the mailbox runs the risk of losing messages or corrupting the entire mailbox.
The :class:`!Mailbox` class supports the :keyword:`with` statement. When used
as a context manager, :class:`!Mailbox` calls :meth:`lock` when the context is entered,
retur... | making any changes by adding or deleting a message. Failing to lock the mailbox runs the risk of losing messages or corrupting the entire mailbox.
The :class:`!Mailbox` class supports the :keyword:`with` statement. When used
as a context manager, :class:`!Mailbox` calls :meth:`lock` when the context is entered,
retur... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c48c97df-3b44-4e29-88a7-12b160f526fd | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,763 | supabase-export-v2 | 0a6b58be73170c84 | are not transformed to ">From " when storing messages because the extra message separator lines prevent mistaking such occurrences for the starts of subsequent messages.
Some :class:`Mailbox` methods implemented by :class:`!MMDF` deserve special
remarks: | trusted_official_docs | CPython Docs | are not transformed to ">From " when storing messages because the extra message separator lines prevent mistaking such occurrences for the starts of subsequent messages.
Some :class:`Mailbox` methods implemented by :class:`!MMDF` deserve special
remarks: | are not transformed to ">From " when storing messages because the extra message separator lines prevent mistaking such occurrences for the starts of subsequent messages.
Some :class:`Mailbox` methods implemented by :class:`!MMDF` deserve special
remarks: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4af7497-28aa-4be8-bbb3-519bd9279b3c | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,617 | supabase-export-v2 | 67866159d32ed015 | If *factory* is ``None``, :class:`MaildirMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
If *create* is ``True`` and the *dirname* path exists, it will be treated as
an existing maildir without attempting to verify its directory layout. | trusted_official_docs | CPython Docs | If *factory* is ``None``, :class:`MaildirMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
If *create* is ``True`` and the *dirname* path exists, it will be treated as
an existing maildir without attempting to verify its directory layout. | If *factory* is ``None``, :class:`MaildirMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
If *create* is ``True`` and the *dirname* path exists, it will be treated as
an existing maildir without attempting to verify its directory layout. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4e2dccc-3103-45fd-a852-7d3d85d1c0a7 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,668 | supabase-export-v2 | 2993429ad9b5940a | .. warning::
These methods generate unique file names based upon the current process
ID. When using multiple threads, undetected name clashes may occur and
cause corruption of the mailbox unless threads are coordinated to avoid
using these methods to manipulate the same mailbox simultaneously. | trusted_official_docs | CPython Docs | .. warning::
These methods generate unique file names based upon the current process
ID. When using multiple threads, undetected name clashes may occur and
cause corruption of the mailbox unless threads are coordinated to avoid
using these methods to manipulate the same mailbox simultaneously. | .. warning::
These methods generate unique file names based upon the current process
ID. When using multiple threads, undetected name clashes may occur and
cause corruption of the mailbox unless threads are coordinated to avoid
using these methods to manipulate the same mailbox simultaneously. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c4f29664-5fd5-4f6f-a2e9-b1703d309478 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,850 | supabase-export-v2 | d111c43dad62f6ba | mail reading programs (although not the standard :program:`mh` and :program:`nmh`) use sequences in much the same way flags are used with other formats, as follows:
+----------+------------------------------------------+
| Sequence | Explanation |
+==========+==========================================+
| unseen | No... | trusted_official_docs | CPython Docs | mail reading programs (although not the standard :program:`mh` and :program:`nmh`) use sequences in much the same way flags are used with other formats, as follows:
+----------+------------------------------------------+
| Sequence | Explanation |
+==========+==========================================+
| unseen | No... | mail reading programs (although not the standard :program:`mh` and :program:`nmh`) use sequences in much the same way flags are used with other formats, as follows:
+----------+------------------------------------------+
| Sequence | Explanation |
+==========+==========================================+
| unseen | No... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c5dc386d-97e8-48dd-8f27-810d1cb94d22 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,891 | supabase-export-v2 | aa75bb422b313a3b | a :class:`!BabylMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+------------------+----------------------------------------------+
| Resulting state | :cla... | trusted_official_docs | CPython Docs | a :class:`!BabylMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+------------------+----------------------------------------------+
| Resulting state | :cla... | a :class:`!BabylMessage` instance is created based upon an :class:`mboxMessage` or :class:`MMDFMessage` instance, the :mailheader:`Status` and :mailheader:`X-Status` headers are omitted and the following conversions take place:
+------------------+----------------------------------------------+
| Resulting state | :cla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c5e06472-0641-430d-bd6c-7be41093584b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,834 | supabase-export-v2 | bd74c29314f7095a | .. method:: add_flag(flag)
Set the flag(s) specified by *flag* without changing other flags. To add
more than one flag at a time, *flag* may be a string of more than one
character. | trusted_official_docs | CPython Docs | .. method:: add_flag(flag)
Set the flag(s) specified by *flag* without changing other flags. To add
more than one flag at a time, *flag* may be a string of more than one
character. | .. method:: add_flag(flag)
Set the flag(s) specified by *flag* without changing other flags. To add
more than one flag at a time, *flag* may be a string of more than one
character. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ca9f3720-4a3b-4871-bbce-979e4b67348e | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,624 | supabase-export-v2 | 644d7aaa1f06a0be | Maildir-like format on such an operating system, you should specify another character to use instead. The exclamation point (``'!'``) is a popular choice. For example::
import mailbox
mailbox.Maildir.colon = '!' | trusted_official_docs | CPython Docs | Maildir-like format on such an operating system, you should specify another character to use instead. The exclamation point (``'!'``) is a popular choice. For example::
import mailbox
mailbox.Maildir.colon = '!' | Maildir-like format on such an operating system, you should specify another character to use instead. The exclamation point (``'!'``) is a popular choice. For example::
import mailbox
mailbox.Maildir.colon = '!' | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cb52692f-709b-48d0-9c5f-8584fee0bcb9 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,537 | supabase-export-v2 | eb7a9373c72ed73f | --------------
This module defines two classes, :class:`Mailbox` and :class:`Message`, for
accessing and manipulating on-disk mailboxes and the messages they contain. :class:`!Mailbox` offers a dictionary-like mapping from keys to messages. :class:`!Message` extends the :mod:`email.message` module's
:class:`~email.mess... | trusted_official_docs | CPython Docs | --------------
This module defines two classes, :class:`Mailbox` and :class:`Message`, for
accessing and manipulating on-disk mailboxes and the messages they contain. :class:`!Mailbox` offers a dictionary-like mapping from keys to messages. :class:`!Message` extends the :mod:`email.message` module's
:class:`~email.mess... | --------------
This module defines two classes, :class:`Mailbox` and :class:`Message`, for
accessing and manipulating on-disk mailboxes and the messages they contain. :class:`!Mailbox` offers a dictionary-like mapping from keys to messages. :class:`!Message` extends the :mod:`email.message` module's
:class:`~email.mess... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d0c2f28a-5cba-4db1-8502-ebb2e644893e | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,822 | supabase-export-v2 | fbba17b47a361372 | Conventional flags for mbox messages are as follows:
+------+----------+--------------------------------+
| Flag | Meaning | Explanation |
+======+==========+================================+
| R | Read | Read |
+------+----------+--------------------------------+
| O | Old | Previously detected by MUA |
+------+... | trusted_official_docs | CPython Docs | Conventional flags for mbox messages are as follows:
+------+----------+--------------------------------+
| Flag | Meaning | Explanation |
+======+==========+================================+
| R | Read | Read |
+------+----------+--------------------------------+
| O | Old | Previously detected by MUA |
+------+... | Conventional flags for mbox messages are as follows:
+------+----------+--------------------------------+
| Flag | Meaning | Explanation |
+======+==========+================================+
| R | Read | Read |
+------+----------+--------------------------------+
| O | Old | Previously detected by MUA |
+------+... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d1a95e20-6d72-45a6-9aad-7e35c43e2e22 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,588 | supabase-export-v2 | 732f6a65ac78dd1b | no such message exists. The file-like object behaves as if open in binary mode. This file should be closed once it is no longer needed.
.. versionchanged:: 3.2
The file object really is a :term:`binary file`; previously it was
incorrectly returned in text mode. Also, the :term:`file-like object`
now supports the :te... | trusted_official_docs | CPython Docs | no such message exists. The file-like object behaves as if open in binary mode. This file should be closed once it is no longer needed.
.. versionchanged:: 3.2
The file object really is a :term:`binary file`; previously it was
incorrectly returned in text mode. Also, the :term:`file-like object`
now supports the :te... | no such message exists. The file-like object behaves as if open in binary mode. This file should be closed once it is no longer needed.
.. versionchanged:: 3.2
The file object really is a :term:`binary file`; previously it was
incorrectly returned in text mode. Also, the :term:`file-like object`
now supports the :te... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d1f438e7-e887-4636-b8e7-78f137f11a1e | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,623 | supabase-export-v2 | 89ea71502db72d7e | .. attribute:: Maildir.colon
The Maildir specification requires the use of a colon (``':'``) in certain
message file names. However, some operating systems do not permit this
character in file names, If you wish to use a Maildir-like format on such
an operating system, you should specify another character to use
in... | trusted_official_docs | CPython Docs | .. attribute:: Maildir.colon
The Maildir specification requires the use of a colon (``':'``) in certain
message file names. However, some operating systems do not permit this
character in file names, If you wish to use a Maildir-like format on such
an operating system, you should specify another character to use
in... | .. attribute:: Maildir.colon
The Maildir specification requires the use of a colon (``':'``) in certain
message file names. However, some operating systems do not permit this
character in file names, If you wish to use a Maildir-like format on such
an operating system, you should specify another character to use
in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d3405398-4433-4cad-bb3b-0150f5123301 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,621 | supabase-export-v2 | 5cfc7bbd167aa019 | the message to the :file:`cur` subdirectory and store information about the state of the message in a special "info" section appended to its file name.
Folders of the style introduced by the Courier mail transfer agent are also
supported. Any subdirectory of the main mailbox is considered a folder if
``'.'`` is the f... | trusted_official_docs | CPython Docs | the message to the :file:`cur` subdirectory and store information about the state of the message in a special "info" section appended to its file name.
Folders of the style introduced by the Courier mail transfer agent are also
supported. Any subdirectory of the main mailbox is considered a folder if
``'.'`` is the f... | the message to the :file:`cur` subdirectory and store information about the state of the message in a special "info" section appended to its file name.
Folders of the style introduced by the Courier mail transfer agent are also
supported. Any subdirectory of the main mailbox is considered a folder if
``'.'`` is the f... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d3a7ef46-1e7e-40bd-b271-6611d0787639 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,785 | supabase-export-v2 | b2e319101ef026df | A message with Maildir-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Typically, a mail user agent application moves all of the messages in the
:file:`new` subdirectory to the :file:`cur` subdirectory after the first time
the user opens and closes the mailbox, r... | trusted_official_docs | CPython Docs | A message with Maildir-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Typically, a mail user agent application moves all of the messages in the
:file:`new` subdirectory to the :file:`cur` subdirectory after the first time
the user opens and closes the mailbox, r... | A message with Maildir-specific behaviors. Parameter *message* has the same meaning as with the :class:`Message` constructor.
Typically, a mail user agent application moves all of the messages in the
:file:`new` subdirectory to the :file:`cur` subdirectory after the first time
the user opens and closes the mailbox, r... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d3a8bf00-15d3-435d-b54c-df1eaab254d7 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,828 | supabase-export-v2 | 2ddf97bd90d0c39c | .. method:: set_from(from_, time_=None)
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
specified and will be formatted appropriately and appended to *from_*. If
*time_* is specified, it should be a :class:`time.struct_time` in... | trusted_official_docs | CPython Docs | .. method:: set_from(from_, time_=None)
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
specified and will be formatted appropriately and appended to *from_*. If
*time_* is specified, it should be a :class:`time.struct_time` in... | .. method:: set_from(from_, time_=None)
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
specified and will be formatted appropriately and appended to *from_*. If
*time_* is specified, it should be a :class:`time.struct_time` in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d46dbfc4-014e-4dbd-be08-6bacc8b68708 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,937 | supabase-export-v2 | 7fb6ee2b56b7653d | A simple example of printing the subjects of all messages in a mailbox that seem interesting::
import mailbox
for message in mailbox.mbox('~/mbox'):
subject = message['subject'] # Could possibly be None. if subject and 'python' in subject.lower():
print(subject) | trusted_official_docs | CPython Docs | A simple example of printing the subjects of all messages in a mailbox that seem interesting::
import mailbox
for message in mailbox.mbox('~/mbox'):
subject = message['subject'] # Could possibly be None. if subject and 'python' in subject.lower():
print(subject) | A simple example of printing the subjects of all messages in a mailbox that seem interesting::
import mailbox
for message in mailbox.mbox('~/mbox'):
subject = message['subject'] # Could possibly be None. if subject and 'python' in subject.lower():
print(subject) | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d6f90e89-1d94-4d90-8dd9-3fbde1422560 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,743 | supabase-export-v2 | c7ac8102f97db023 | If *factory* is ``None``, :class:`BabylMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
Babyl is a single-file mailbox format used by the Rmail mail user agent
included with Emacs. The beginning of a message is indicated by a line
containing... | trusted_official_docs | CPython Docs | If *factory* is ``None``, :class:`BabylMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
Babyl is a single-file mailbox format used by the Rmail mail user agent
included with Emacs. The beginning of a message is indicated by a line
containing... | If *factory* is ``None``, :class:`BabylMessage` is used as the default message representation. If *create* is ``True``, the mailbox is created if it does not exist.
Babyl is a single-file mailbox format used by the Rmail mail user agent
included with Emacs. The beginning of a message is indicated by a line
containing... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d8150800-805d-4638-b047-6bbebf71a6a1 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,768 | supabase-export-v2 | 6c0e7c8fa769c314 | Using the file after calling :meth:`~Mailbox.flush` or :meth:`~Mailbox.close` on the :class:`!MMDF` instance may yield unpredictable results or raise an exception.
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is... | trusted_official_docs | CPython Docs | Using the file after calling :meth:`~Mailbox.flush` or :meth:`~Mailbox.close` on the :class:`!MMDF` instance may yield unpredictable results or raise an exception.
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is... | Using the file after calling :meth:`~Mailbox.flush` or :meth:`~Mailbox.close` on the :class:`!MMDF` instance may yield unpredictable results or raise an exception.
Note: This method has an extra parameter (*from_*) compared with other classes. The first line of an mbox file entry is the Unix "From " line. If *from_* is... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dae20c17-3707-4d39-b6af-cec7c6902432 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,644 | supabase-export-v2 | ff8b962c89290afc | On the message corresponding to *key*, set the flags specified by *flags* and unset all others. Calling ``some_mailbox.set_flags(key, flags)`` is similar to ::
one_message = some_mailbox.get_message(key)
one_message.set_flags(flags)
some_mailbox[key] = one_message | trusted_official_docs | CPython Docs | On the message corresponding to *key*, set the flags specified by *flags* and unset all others. Calling ``some_mailbox.set_flags(key, flags)`` is similar to ::
one_message = some_mailbox.get_message(key)
one_message.set_flags(flags)
some_mailbox[key] = one_message | On the message corresponding to *key*, set the flags specified by *flags* and unset all others. Calling ``some_mailbox.set_flags(key, flags)`` is similar to ::
one_message = some_mailbox.get_message(key)
one_message.set_flags(flags)
some_mailbox[key] = one_message | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dbbe6a4d-11b9-43d6-96da-06b09a4d72b4 | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,544 | supabase-export-v2 | eb146f557d662288 | A mailbox, which may be inspected and modified.
The :class:`!Mailbox` class defines an interface and is not intended to be
instantiated. Instead, format-specific subclasses should inherit from
:class:`!Mailbox` and your code should instantiate a particular subclass. | trusted_official_docs | CPython Docs | A mailbox, which may be inspected and modified.
The :class:`!Mailbox` class defines an interface and is not intended to be
instantiated. Instead, format-specific subclasses should inherit from
:class:`!Mailbox` and your code should instantiate a particular subclass. | A mailbox, which may be inspected and modified.
The :class:`!Mailbox` class defines an interface and is not intended to be
instantiated. Instead, format-specific subclasses should inherit from
:class:`!Mailbox` and your code should instantiate a particular subclass. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dde25715-5595-4cf2-88dc-0d2ed9ba5a1b | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,922 | supabase-export-v2 | fb7c500996cd663f | When an :class:`!MMDFMessage` instance is created based upon an :class:`mboxMessage` instance, the "From " line is copied and all flags directly correspond:
+-----------------+----------------------------+
| Resulting state | :class:`mboxMessage` state |
+=================+============================+
| R flag | R fla... | trusted_official_docs | CPython Docs | When an :class:`!MMDFMessage` instance is created based upon an :class:`mboxMessage` instance, the "From " line is copied and all flags directly correspond:
+-----------------+----------------------------+
| Resulting state | :class:`mboxMessage` state |
+=================+============================+
| R flag | R fla... | When an :class:`!MMDFMessage` instance is created based upon an :class:`mboxMessage` instance, the "From " line is copied and all flags directly correspond:
+-----------------+----------------------------+
| Resulting state | :class:`mboxMessage` state |
+=================+============================+
| R flag | R fla... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e0624638-2ed6-4f63-8b74-41fcdbda18eb | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,872 | supabase-export-v2 | fef2a4e10ffb2bc8 | Replied to | +-----------+------------------------------------------+ | forwarded | Forwarded | +-----------+------------------------------------------+ | edited | Modified by the user | +-----------+------------------------------------------+ | resent | Resent | +-----------+------------------------------------------+... | trusted_official_docs | CPython Docs | Replied to | +-----------+------------------------------------------+ | forwarded | Forwarded | +-----------+------------------------------------------+ | edited | Modified by the user | +-----------+------------------------------------------+ | resent | Resent | +-----------+------------------------------------------+... | Replied to | +-----------+------------------------------------------+ | forwarded | Forwarded | +-----------+------------------------------------------+ | edited | Modified by the user | +-----------+------------------------------------------+ | resent | Resent | +-----------+------------------------------------------+... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e26263be-c405-4ba5-be97-03d8667b837e | CPython Docs | file://datasets/cpython/Doc/library/mailbox.rst | unknown | 0846099f-ac60-4881-88e4-45e8ce607a85 | 50,727 | supabase-export-v2 | 32f31b9b20a0bdda | .. method:: remove(key) __delitem__(key) discard(key)
These methods immediately delete the message. The MH convention of marking
a message for deletion by prepending a comma to its name is not used. | trusted_official_docs | CPython Docs | .. method:: remove(key) __delitem__(key) discard(key)
These methods immediately delete the message. The MH convention of marking
a message for deletion by prepending a comma to its name is not used. | .. method:: remove(key) __delitem__(key) discard(key)
These methods immediately delete the message. The MH convention of marking
a message for deletion by prepending a comma to its name is not used. | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.