Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
???? ???????? ??????, ???????? ???????????????? ?????? ? ??????? ??????.

        def obj_from_str(str_or_obj):
    '''
    ???? ???????? ??????, ???????? ???????????????? ?????? ? ??????? ??????.
    '''
    if isinstance(str_or_obj, basestring):
        if '.' not in str_or_obj:
            str_or_obj = str_or_obj + '.'
        mod_name, obj_name = str_or_obj.rsplit('.', 1)
        __import__(mod_name)
        mod = sys.modules[mod_name]
        return getattr(mod, obj_name) if obj_name else mod
    else:
        return str_or_obj
        


src/p/y/pysi-0.18.0/pysi/wsgi.py   pysi(Download)
import simplejson as json
 
from util import cached_property, make_traceback, obj_from_str, list_obj_from_str
from config import cfg
from exceptions import HttpError, BasicAuth
 
        try:
            cfg_module = obj_from_str(self.cfg_module)
        except ImportError:
            cfg_module = None

src/p/y/pysi-0.18.0/pysi/template.py   pysi(Download)
import wsgi
from config import cfg
from util import obj_from_str, cached_function
 
def render_to_string(rq, template, context=None):
 
    env = jinja2.Environment(
        loader = jinja2.FunctionLoader(obj_from_str(cfg.TEMPLATE_LOADER)),
        autoescape = True,
        cache_size = cfg.TEMPLATE_CACHE_SIZE,