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

All Samples(28)  |  Call(14)  |  Derive(0)  |  Import(14)
>>> split_mime_type('text/xml; charset=utf-8')
('text', 'xml', 'charset=utf-8')

        def split_mime_type(mime_type):
    """
    >>> split_mime_type('text/xml; charset=utf-8')
    ('text', 'xml', 'charset=utf-8')
    """
    options = None
    mime_class = None
    if '/' in mime_type:
        mime_class, mime_type = mime_type.split('/', 1)
    if ';' in mime_type:
        mime_type, options = [part.strip() for part in mime_type.split(';', 2)]
    return mime_class, mime_type, options
        


src/m/a/MapProxy-1.6.0/mapproxy/request/wms/__init__.py   MapProxy(Download)
from mapproxy.exception import RequestError
from mapproxy.srs import SRS, make_lin_transf
from mapproxy.request.base import RequestParams, BaseRequest, split_mime_type
 
import logging
    def _get_format(self):
        """
        The requested format as string (w/o any 'image/', 'text/', etc prefixes)
        """
        _mime_class, format, options = split_mime_type(self.get('format', default=''))

src/m/a/mapproxy-HEAD/mapproxy/request/wms/__init__.py   mapproxy(Download)
from mapproxy.exception import RequestError
from mapproxy.srs import SRS, make_lin_transf
from mapproxy.request.base import RequestParams, BaseRequest, split_mime_type
 
import logging
    def _get_format(self):
        """
        The requested format as string (w/o any 'image/', 'text/', etc prefixes)
        """
        _mime_class, format, options = split_mime_type(self.get('format', default=''))

src/m/a/MapProxy-1.6.0/mapproxy/request/wmts.py   MapProxy(Download)
 
from mapproxy.exception import RequestError
from mapproxy.request.base import RequestParams, BaseRequest, split_mime_type
from mapproxy.request.tile import TileRequest
from mapproxy.exception import XMLExceptionHandler
    def _get_format(self):
        """
        The requested format as string (w/o any 'image/', 'text/', etc prefixes)
        """
        _mime_class, format, options = split_mime_type(self.get('format', default=''))

src/m/a/mapproxy-HEAD/mapproxy/request/wmts.py   mapproxy(Download)
 
from mapproxy.exception import RequestError
from mapproxy.request.base import RequestParams, BaseRequest, split_mime_type
from mapproxy.request.tile import TileRequest
from mapproxy.exception import XMLExceptionHandler
    def _get_format(self):
        """
        The requested format as string (w/o any 'image/', 'text/', etc prefixes)
        """
        _mime_class, format, options = split_mime_type(self.get('format', default=''))

src/m/a/MapProxy-1.6.0/mapproxy/config/loader.py   MapProxy(Download)
def file_ext(mimetype):
    from mapproxy.request.base import split_mime_type
    _mime_class, format, _options = split_mime_type(mimetype)
    return format
 

src/m/a/mapproxy-HEAD/mapproxy/config/loader.py   mapproxy(Download)
def file_ext(mimetype):
    from mapproxy.request.base import split_mime_type
    _mime_class, format, _options = split_mime_type(mimetype)
    return format
 

src/m/a/MapProxy-1.6.0/mapproxy/client/wms.py   MapProxy(Download)
"""
from __future__ import with_statement
from mapproxy.request.base import split_mime_type
from mapproxy.layer import InfoQuery
from mapproxy.source import SourceError
    def get_legend(self, query):
        resp = self._retrieve(query)
        format = split_mime_type(query.format)[1]
        self._check_resp(resp)
        return ImageSource(resp, image_opts=ImageOptions(format=format))
    def get_legend(self, query):
        resp = self.http_client.open(self.url)
        format = split_mime_type(query.format)[1]
        self._check_resp(resp)
        return ImageSource(resp, image_opts=ImageOptions(format=format))

src/m/a/mapproxy-HEAD/mapproxy/client/wms.py   mapproxy(Download)
"""
from __future__ import with_statement
from mapproxy.request.base import split_mime_type
from mapproxy.layer import InfoQuery
from mapproxy.source import SourceError
    def get_legend(self, query):
        resp = self._retrieve(query)
        format = split_mime_type(query.format)[1]
        self._check_resp(resp)
        return ImageSource(resp, image_opts=ImageOptions(format=format))
    def get_legend(self, query):
        resp = self.http_client.open(self.url)
        format = split_mime_type(query.format)[1]
        self._check_resp(resp)
        return ImageSource(resp, image_opts=ImageOptions(format=format))

src/m/a/MapProxy-1.6.0/mapproxy/source/wms.py   MapProxy(Download)
"""
import sys
from mapproxy.request.base import split_mime_type
from mapproxy.cache.legend import Legend, legend_identifier
from mapproxy.image import make_transparent, ImageSource, SubImageSource, bbox_position_in_image
                    # TODO errors?
                    log.error(e.args[0])
            format = split_mime_type(query.format)[1]
            legend = Legend(source=concat_legends(legends, format=format),
                            id=self.identifier, scale=query.scale)

src/m/a/MapProxy-1.6.0/mapproxy/service/tile.py   MapProxy(Download)
from mapproxy.service.base import Server
from mapproxy.request.tile import tile_request
from mapproxy.request.base import split_mime_type
from mapproxy.layer import map_extent_from_grid
from mapproxy.source import SourceError
    def format(self):
        _mime_class, format, _options = split_mime_type(self.format_mime_type)
        return format
 
    @property

  1 | 2  Next