• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(71660)  |  Call(66834)  |  Derive(4820)  |  Import(6)
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
    d = {}
    for k, v in iterable:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

src/p/i/pinky-HEAD/lib/pinky.py   pinky(Download)
def parse_style(arg):
    """Parse a CSS attribute list into a dictionary."""
    lines = (l.strip() for l in arg.split(';'))
    pairs = (l.split(':') for l in lines if l)
    return dict((k.strip(), v.strip()) for k, v in pairs)
 
def parse_shape(element):
class Color(object):
    """An RGB color with integer components in the [0, 255] range."""
 
    # http://www.w3.org/TR/SVG/types.html#ColorKeywords
    _color_keywords = dict(
        aliceblue=(240, 248, 255),
        antiquewhite=(250, 235, 215),
        ('[, \t\r\n]+', None),
    ])
 
    _command_classes = dict(M=Moveto, Z=Closepath, L=Lineto, C=Curveto,
                            S=SmoothCurveto, Q=QuadraticBezierCurveto,
                            T=SmoothQuadraticBezierCurveto, A=EllipticalArc)
 

src/p/d/pdfread-HEAD/trunk/src/pylrs/pylrf.py   pdfread(Download)
 
LRF_VERSION = 1000  # is 999 for librie? lrf2lrs uses 1000
 
IMAGE_TYPE_ENCODING = dict(GIF=0x14, PNG=0x12, BMP=0x13, JPEG=0x11, JPG=0x11)
 
OBJECT_TYPE_ENCODING = dict(
        PageTree        = 0x01,
        'none':0, 'solid':0x10, 'dashed':0x20, 'double':0x30, 'dotted':0x40
}
 
BINDING_DIRECTION_ENCODING = dict(Lr=1, Rl=16)
 
 
TAG_INFO = dict(
        rawtext         = (0, writeRaw),
    def __init__(self, name, *parameters):
        try:
            tagInfo = TAG_INFO[name]
        except KeyError:
            raise LrfError, "tag name %s not recognized" % name
 
        self.name = name
        self.objId = objId
        self.tags = []
        try:
            self.type = OBJECT_TYPE_ENCODING[name]
        except KeyError:
            raise LrfError, "object name %s not recognized" % name
 
            encoding = os.path.splitext(filename)[1][1:]
 
        encoding = encoding.upper()
        if encoding not in IMAGE_TYPE_ENCODING:
            raise LrfError, "unknown image type: " + encoding
 
        self.thumbnailEncoding = encoding
        docInfoXml = codecs.BOM_LE + self.docInfoXml.encode("utf-16-le")
        compDocInfo = zlib.compress(docInfoXml)
        writeWord(lrf, len(compDocInfo) + 4)
        writeWord(lrf, IMAGE_TYPE_ENCODING[self.thumbnailEncoding])
        writeDWord(lrf, len(self.thumbnailData))
        writeDWord(lrf, len(docInfoXml))
        writeString(lrf, compDocInfo)

src/p/d/pdfread-HEAD/src/pylrs/pylrf.py   pdfread(Download)
 
LRF_VERSION = 1000  # is 999 for librie? lrf2lrs uses 1000
 
IMAGE_TYPE_ENCODING = dict(GIF=0x14, PNG=0x12, BMP=0x13, JPEG=0x11, JPG=0x11)
 
OBJECT_TYPE_ENCODING = dict(
        PageTree        = 0x01,
        'none':0, 'solid':0x10, 'dashed':0x20, 'double':0x30, 'dotted':0x40
}
 
BINDING_DIRECTION_ENCODING = dict(Lr=1, Rl=16)
 
 
TAG_INFO = dict(
        rawtext         = (0, writeRaw),
    def __init__(self, name, *parameters):
        try:
            tagInfo = TAG_INFO[name]
        except KeyError:
            raise LrfError, "tag name %s not recognized" % name
 
        self.name = name
        self.objId = objId
        self.tags = []
        try:
            self.type = OBJECT_TYPE_ENCODING[name]
        except KeyError:
            raise LrfError, "object name %s not recognized" % name
 
            encoding = os.path.splitext(filename)[1][1:]
 
        encoding = encoding.upper()
        if encoding not in IMAGE_TYPE_ENCODING:
            raise LrfError, "unknown image type: " + encoding
 
        self.thumbnailEncoding = encoding
        docInfoXml = codecs.BOM_LE + self.docInfoXml.encode("utf-16-le")
        compDocInfo = zlib.compress(docInfoXml)
        writeWord(lrf, len(compDocInfo) + 4)
        writeWord(lrf, IMAGE_TYPE_ENCODING[self.thumbnailEncoding])
        writeDWord(lrf, len(self.thumbnailData))
        writeDWord(lrf, len(docInfoXml))
        writeString(lrf, compDocInfo)

src/f/l/Flask-FluidDB-0.1/env/lib/python2.6/site-packages/sphinx/config.py   Flask-FluidDB(Download)
 
    config_values = dict(
        # general options
        project = ('Python', 'env'),
        copyright = ('', 'html'),
        version = ('', 'env'),
        release = ('', 'env'),

src/n/e/Nevow-0.10.0/examples/tests/testexamples.py   Nevow(Download)
from nevow import livetest
 
 
all_suites = dict(
    most_basic=[
        ('visit', '/most_basic/', ''),
        ('assert', 'foo', 'foo'),
 
live_suites = dict(
    ## Now the fun stuff: The livepage example tests.
liveanimal=[
        ('visit', '/liveanimal/?fresh=true', ''),
        ('assert', 'question', 'I give up. What is the animal, and what question describes it?'),
        ('submit', 'new-question', {'animal': "Monkey", 'new-question': 'is it crazy'}),

src/h/g/hgblog-0.5/sphinx/config.py   hgblog(Download)
 
    config_values = dict(
        # general options
        project = ('Python', 'env'),
        copyright = ('', 'html'),
        enable_comments = (False, 'env'),
        disqus_site = ('', 'env'),

src/s/p/Sphinx-1.0.4/sphinx/config.py   Sphinx(Download)
 
    config_values = dict(
        # general options
        project = ('Python', 'env'),
        copyright = ('', 'html'),
        version = ('', 'env'),
        release = ('', 'env'),

src/e/p/epydoc-HEAD/epydoc/src/epydoc/docwriter/html_css.py   epydoc(Download)
 
_WHITE_COLORS = dict(
    # Defaults:
    body_bg                 =  '#ffffff',
    body_fg                 =  '#000000',
    body_link               =  '#0000ff',
    body_visited_link       =  '#204080',
_BLUE_COLORS = _WHITE_COLORS.copy()
_BLUE_COLORS.update(dict(
    # Body: white text on a dark blue background
    body_bg                 =  '#000070',
    body_fg                 =  '#ffffff',
    body_link               =  '#ffffff',
    body_visited_link       =  '#d0d0ff',
    doctest_in_table_fg     =  '#000000',
    ))
 
_WHITE = _set_colors(TEMPLATE, _WHITE_COLORS)
_BLUE = _set_colors(TEMPLATE, _BLUE_COLORS)
 
    # Black-on-green

src/e/p/epydoc-HEAD/src/epydoc/docwriter/html_css.py   epydoc(Download)
 
_WHITE_COLORS = dict(
    # Defaults:
    body_bg                 =  '#ffffff',
    body_fg                 =  '#000000',
    body_link               =  '#0000ff',
    body_visited_link       =  '#204080',
_BLUE_COLORS = _WHITE_COLORS.copy()
_BLUE_COLORS.update(dict(
    # Body: white text on a dark blue background
    body_bg                 =  '#000070',
    body_fg                 =  '#ffffff',
    body_link               =  '#ffffff',
    body_visited_link       =  '#d0d0ff',
    doctest_in_table_fg     =  '#000000',
    ))
 
_WHITE = _set_colors(TEMPLATE, _WHITE_COLORS)
_BLUE = _set_colors(TEMPLATE, _BLUE_COLORS)
 
    # Black-on-green

src/t/a/taskcoach-HEAD/trunk/taskcoach/taskcoachlib/gui/artprovider.py   taskcoach(Download)
    def __init__(self):
        self.__iconCache = dict()
        self.__iconSizeOnCurrentPlatform = 128 if '__WXMAC__' == wx.Platform else 16
 
    def getIcon(self, iconTitle): 
        ''' Return the icon. Use a cache to prevent leakage of GDI object 
            count. '''
 
 
chooseableItemImages = dict( \
    arrow_down_icon=_('Arrow down'),
    arrow_down_with_status_icon=_('Arrow down with status'),
    arrows_looped_blue_icon=_('Blue arrows looped'),
    arrows_looped_green_icon=_('Green arrows looped'),

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next