from ctypes import c_char_p, c_void_p, c_long, c_uint, c_int
from datetime import date
from ctypes import c_char_p, c_void_p, c_long, c_uint, c_int
from datetime import date
-from notmuch.globals import nmlib, STATUS, NotmuchError, Enum
+from notmuch.globals import nmlib, STATUS, NotmuchError, Enum, _str
if (match or entire_thread):
if format.lower() == "text":
sys.stdout.write(msg.format_message_as_text(indent))
if (match or entire_thread):
if format.lower() == "text":
sys.stdout.write(msg.format_message_as_text(indent))
return Message._get_date(self._msg)
def get_header(self, header):
return Message._get_date(self._msg)
def get_header(self, header):
- This returns any message header that is stored in the notmuch database.
- This is only a selected subset of headers, which is currently:
+ The value will be read from the actual message file, not from
+ the notmuch database. The header name is case insensitive.
:type header: str
:returns: The header value as string
:exception: :exc:`NotmuchError`
* STATUS.NOT_INITIALIZED if the message
is not initialized.
:type header: str
:returns: The header value as string
:exception: :exc:`NotmuchError`
* STATUS.NOT_INITIALIZED if the message
is not initialized.
header = Message._get_header(self._msg, header)
if header == None:
raise NotmuchError(STATUS.NULL_POINTER)
header = Message._get_header(self._msg, header)
if header == None:
raise NotmuchError(STATUS.NULL_POINTER)