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

All Samples(30)  |  Call(23)  |  Derive(0)  |  Import(7)

            def iteritems(d): return d.iteritems()
        


src/i/p/ipython-HEAD/IPython/utils/pickleutil.py   ipython(Download)
from . import py3compat
from .importstring import import_item
from .py3compat import string_types, iteritems
 
from IPython.config import Application
    import_needed = False
 
    for cls,canner in iteritems(can_map):
        if isinstance(cls, string_types):
            import_needed = True
def can_dict(obj):
    """can the *values* of a dict"""
    if istype(obj, dict):
        newobj = {}
        for k, v in iteritems(obj):
def uncan(obj, g=None):
    """invert canning"""
 
    import_needed = False
    for cls,uncanner in iteritems(uncan_map):
def uncan_dict(obj, g=None):
    if istype(obj, dict):
        newobj = {}
        for k, v in iteritems(obj):
            newobj[k] = uncan(v,g)

src/i/p/ipython-2.0.0/IPython/utils/pickleutil.py   ipython(Download)
from . import py3compat
from .importstring import import_item
from .py3compat import string_types, iteritems
 
from IPython.config import Application
    import_needed = False
 
    for cls,canner in iteritems(can_map):
        if isinstance(cls, string_types):
            import_needed = True
def can_dict(obj):
    """can the *values* of a dict"""
    if istype(obj, dict):
        newobj = {}
        for k, v in iteritems(obj):
def uncan(obj, g=None):
    """invert canning"""
 
    import_needed = False
    for cls,uncanner in iteritems(uncan_map):
def uncan_dict(obj, g=None):
    if istype(obj, dict):
        newobj = {}
        for k, v in iteritems(obj):
            newobj[k] = uncan(v,g)

src/i/p/ipython-HEAD/IPython/utils/wildcard.py   ipython(Download)
 
from IPython.utils.dir2 import dir2
from .py3compat import iteritems
 
def create_typestr2type_dicts(dont_include_in_type2typestr=["lambda"]):
 
    # Check each one matches regex; shouldn't be hidden; of correct type.
    return dict((key,obj) for key, obj in iteritems(ns) if reg.match(key) \
                                            and show_hidden(key, show_all) \
                                            and is_type(obj, type_pattern) )
                            ignore_case=ignore_case, show_all=show_all)
        results = {}
        for name, obj in iteritems(filtered):
            ns = list_namespace(dict_dir(obj), type_pattern,
                                ".".join(pattern_list[1:]),
                                ignore_case=ignore_case, show_all=show_all)
            for inner_name, inner_obj in iteritems(ns):

src/i/p/ipython-2.0.0/IPython/utils/wildcard.py   ipython(Download)
 
from IPython.utils.dir2 import dir2
from .py3compat import iteritems
 
def create_typestr2type_dicts(dont_include_in_type2typestr=["lambda"]):
 
    # Check each one matches regex; shouldn't be hidden; of correct type.
    return dict((key,obj) for key, obj in iteritems(ns) if reg.match(key) \
                                            and show_hidden(key, show_all) \
                                            and is_type(obj, type_pattern) )
                            ignore_case=ignore_case, show_all=show_all)
        results = {}
        for name, obj in iteritems(filtered):
            ns = list_namespace(dict_dir(obj), type_pattern,
                                ".".join(pattern_list[1:]),
                                ignore_case=ignore_case, show_all=show_all)
            for inner_name, inner_obj in iteritems(ns):

src/t/r/traitlets-0.0.2/traitlets/configurable.py   traitlets(Download)
from .traitlets import HasTraits, Instance, List, Any, TraitError
from .text import indent, wrap_paragraphs
from .py3compat import iteritems
 
#-----------------------------------------------------------------------------
    def merge(self, other):
        """merge another config object into this one"""
        to_update = {}
        for k, v in iteritems(other):
            if k not in self:
 
        my_config = self._find_my_config(cfg)
        for name, config_value in iteritems(my_config):
            if name in traits:
                if isinstance(config_value, LazyConfigValue):
            lines.append('')
 
        for name, trait in iteritems(cls.class_traits(config=True)):
            help = trait.get_metadata('help') or ''
            lines.append(c(help))

src/i/p/ipython-HEAD/IPython/utils/tests/test_jsonutil.py   ipython(Download)
from IPython.utils import jsonutil, tz
from ..jsonutil import json_clean, encode_images
from ..py3compat import unicode_to_str, str_to_bytes, iteritems
 
#-----------------------------------------------------------------------------
    }
    encoded = encode_images(fmt)
    for key, value in iteritems(fmt):
        # encoded has unicode, want bytes
        decoded = decodestring(encoded[key].encode('ascii'))
 
    b64_str = {}
    for key, encoded in iteritems(encoded):
        b64_str[key] = unicode_to_str(encoded)
    encoded3 = encode_images(b64_str)
    nt.assert_equal(encoded3, b64_str)
    for key, value in iteritems(fmt):

src/i/p/ipython-2.0.0/IPython/utils/tests/test_jsonutil.py   ipython(Download)
from IPython.utils import jsonutil, tz
from ..jsonutil import json_clean, encode_images
from ..py3compat import unicode_to_str, str_to_bytes, iteritems
 
#-----------------------------------------------------------------------------
    }
    encoded = encode_images(fmt)
    for key, value in iteritems(fmt):
        # encoded has unicode, want bytes
        decoded = decodestring(encoded[key].encode('ascii'))
 
    b64_str = {}
    for key, encoded in iteritems(encoded):
        b64_str[key] = unicode_to_str(encoded)
    encoded3 = encode_images(b64_str)
    nt.assert_equal(encoded3, b64_str)
    for key, value in iteritems(fmt):