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

All Samples(85)  |  Call(68)  |  Derive(0)  |  Import(17)

        def upack2(s, encoding='ascii'):
    # If not unicode, make it so.
    if isinstance(s, unicode):
        us = s
    else:
        us = unicode(s, encoding)
    # Limit is based on number of content characters
    # (not on number of bytes in packed result)
    len_us = len(us)
    if len_us > 32767:
        raise Exception('String longer than 32767 characters')
    try:
        encs = us.encode('latin1')
        # Success here means all chars are in U+0000 to U+00FF
        # inclusive, meaning that we can use "compressed format".
        flag = 0
        n_items = len_us
    except UnicodeEncodeError:
        encs = us.encode('utf_16_le')
        flag = 1
        n_items = len(encs) // 2
        # n_items is the number of "double byte characters" i.e. MS C wchars
        # Can't use len(us).
        # len(u"\U0001D400") -> 1 on a wide-unicode build 
        # and 2 on a narrow-unicode build.
        # We need n_items == 2 in this case.
    return pack('
    


src/x/l/xlwt-future-0.8.0/xlwt/BIFFRecords.py   xlwt-future(Download)
# -*- coding: cp1252 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from .UnicodeUtils import upack1, upack2, upack2rt
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == b'\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/x/l/xlwt-0.7.5/xlwt/BIFFRecords.py   xlwt(Download)
# -*- coding: cp1252 -*-
from struct import pack
from UnicodeUtils import upack1, upack2, upack2rt
 
class SharedStringTable(object):
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == '\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/h/u/hue-HEAD/desktop/core/ext-py/tablib-develop/tablib/packages/xlwt3/BIFFRecords.py   hue(Download)
from struct import pack
from .UnicodeUtils import upack1, upack2
import sys
 
class SharedStringTable(object):
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
        # (to_py3): added b'...'
        is_unicode_str = u_str[2] == b'\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/h/u/hue-HEAD/desktop/core/ext-py/tablib-develop/tablib/packages/xlwt/BIFFRecords.py   hue(Download)
# -*- coding: cp1252 -*-
from struct import pack
from UnicodeUtils import upack1, upack2
import sys
 
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == '\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/r/e/remo-HEAD/vendor-local/lib/python/tablib/packages/xlwt/BIFFRecords.py   remo(Download)
# -*- coding: cp1252 -*-
from struct import pack
from UnicodeUtils import upack1, upack2
import sys
 
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == '\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/m/o/mozillians-HEAD/vendor-local/lib/python/tablib/packages/xlwt/BIFFRecords.py   mozillians(Download)
# -*- coding: cp1252 -*-
from struct import pack
from UnicodeUtils import upack1, upack2
import sys
 
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == '\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/t/a/tablib-0.9.11/tablib/packages/xlwt3/BIFFRecords.py   tablib(Download)
from struct import pack
from .UnicodeUtils import upack1, upack2
import sys
 
class SharedStringTable(object):
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
        # (to_py3): added b'...'
        is_unicode_str = u_str[2] == b'\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/t/a/tablib-0.9.11/tablib/packages/xlwt/BIFFRecords.py   tablib(Download)
# -*- coding: cp1252 -*-
from struct import pack
from UnicodeUtils import upack1, upack2
import sys
 
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == '\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/t/a/tablib-garetjax-0.9.12/tablib/packages/xlwt3/BIFFRecords.py   tablib-garetjax(Download)
from struct import pack
from .UnicodeUtils import upack1, upack2
import sys
 
class SharedStringTable(object):
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
        # (to_py3): added b'...'
        is_unicode_str = u_str[2] == b'\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

src/t/a/tablib-garetjax-0.9.12/tablib/packages/xlwt/BIFFRecords.py   tablib-garetjax(Download)
# -*- coding: cp1252 -*-
from struct import pack
from UnicodeUtils import upack1, upack2
import sys
 
    def _add_to_sst(self, s):
        u_str = upack2(s, self.encoding)
 
        is_unicode_str = u_str[2] == '\x01'
        if is_unicode_str:
    def __init__(self, idx, fmtstr):
        ufmtstr = upack2(fmtstr)
        ufmtstr_len = len(ufmtstr)
 
        self._rec_data = pack('<H%ds' % ufmtstr_len, idx, ufmtstr)
    def __init__(self, header_str):
        self._rec_data = upack2(header_str)
 
class FooterRecord(BiffRecord):
    """
    def __init__(self, footer_str):
        self._rec_data = upack2(footer_str)
 
 
class HCenterRecord(BiffRecord):

  1 | 2  Next