Did I find the right examples for you? yes no

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

          def isstr(obj):
    return isinstance(obj, basestring)

src/p/y/pyramid_describe-0.1.35/pyramid_describe/describer.py   pyramid_describe(Download)
from .entry import Entry
from .util import adict, isstr, tolist, resolve, pick, reparse, runFilters, tag
from . import rst, doctree
from .i18n import _
  def __init__(self, settings=None, default=None, override=None):
    self.settings  = adict(settings or dict())
    self.include   = [reparse(expr) if isstr(expr) else expr
                      for expr in tolist(self.settings.include or '')]
    self.exclude   = [reparse(expr) if isstr(expr) else expr
  def get_endpoints(self, options):
    if isstr(options.view) and self.settings.config:
      # TODO: is this the "right" way?...
      # TODO: DRY... see cli.py!

src/p/y/pyramid_controllers-0.3.22/pyramid_controllers/decorator.py   pyramid_controllers(Download)
import types, inspect, new
from .util import adict, isstr
PCATTR = '__pyramid_controllers__'
  def enhance(self, wrapped, decoration, kw):
    if kw.method:
      if isstr(kw.method):
        kw.method = [kw.method]
      kw.method = set([e.upper() for e in kw.method])
  def enhance(self, wrapped, decoration, kw):
    if kw.name and isstr(kw.name):
      kw.name = [kw.name]
    if 'ext' in kw:
      if not kw.name:
        kw.name = [wrapped.__name__]
      if kw.ext is None or isstr(kw.ext):
      #       the Decoration class (instead of replicating here...)
      if defs.method:
        if isstr(defs.method):
          defs.method = [defs.method]
        defs.method = set([e.upper() for e in defs.method])

src/p/y/pyramid_controllers-0.3.22/pyramid_controllers/dispatcher.py   pyramid_controllers(Download)
from .controller import Controller
from . import decorator
from .util import adict, isstr
path2meth = re.compile('[^a-zA-Z0-9_]')

src/t/e/TemplateAlchemy-0.1.20/templatealchemy/engine.py   TemplateAlchemy(Download)
import os, yaml, re
from . import util, api
from .util import adict, isstr
__all__ = ('Manager', 'Template', 'loadSource', 'loadRenderer')