Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(12)  |  Derive(0)  |  Import(4)

src/f/l/flanker-0.4.14/flanker/mime/message/part.py   flanker(Download)
from flanker.mime import bounce
from flanker.mime.message import headers, charsets
from flanker.mime.message.headers import WithParams, ContentType, MessageId, Subject
from flanker.mime.message.headers.parametrized import fix_content_type
from flanker.mime.message.errors import EncodingError, DecodingError
            main, sub = fix_content_type(
                guessed, default=('application', 'octet-stream'))
            content_type = ContentType(main, sub)
 
    if content_type.main == 'image' and body:
        sub = imghdr.what(None, body)
        if sub:
            content_type = ContentType('image', sub)
        sub = audio._whatsnd(body)
        if sub:
            content_type = ContentType('audio', sub)
 
    return content_type
    def charset(self, value):
        charset = value.lower()
        self.content_type.set_charset(value)
        if 'Content-Type' not in self.headers:
            self.headers['Content-Type'] = ContentType('text', 'plain', {})

src/f/l/flanker-HEAD/flanker/mime/message/part.py   flanker(Download)
from flanker.mime import bounce
from flanker.mime.message import headers, charsets
from flanker.mime.message.headers import WithParams, ContentType, MessageId, Subject
from flanker.mime.message.headers.parametrized import fix_content_type
from flanker.mime.message.errors import EncodingError, DecodingError
            main, sub = fix_content_type(
                guessed, default=('application', 'octet-stream'))
            content_type = ContentType(main, sub)
 
    if content_type.main == 'image' and body:
        sub = imghdr.what(None, body)
        if sub:
            content_type = ContentType('image', sub)
        sub = audio._whatsnd(body)
        if sub:
            content_type = ContentType('audio', sub)
 
    return content_type
    def charset(self, value):
        charset = value.lower()
        self.content_type.set_charset(value)
        if 'Content-Type' not in self.headers:
            self.headers['Content-Type'] = ContentType('text', 'plain', {})

src/f/l/flanker-0.4.14/flanker/mime/message/scanner.py   flanker(Download)
import regex as re
from collections import deque
from cStringIO import StringIO
from flanker.mime.message.headers import parsing, is_empty, ContentType
from flanker.mime.message.part import MimePart, Stream
 
    return make_part(
        content_type=content_type or ContentType("text", "plain"),
        start=pointer,
        end=end,
def default_content_type():
    return ContentType("text", "plain", {'charset': 'ascii'})
 
 
def make_part(content_type, start, end, iterator,

src/f/l/flanker-HEAD/flanker/mime/message/scanner.py   flanker(Download)
import regex as re
from collections import deque
from cStringIO import StringIO
from flanker.mime.message.headers import parsing, is_empty, ContentType
from flanker.mime.message.part import MimePart, Stream
 
    return make_part(
        content_type=content_type or ContentType("text", "plain"),
        start=pointer,
        end=end,
def default_content_type():
    return ContentType("text", "plain", {'charset': 'ascii'})
 
 
def make_part(content_type, start, end, iterator,