Repository URL to install this package:
Version:
4.0.109 ▾
|
ó öEYc @@ sf d Z d d l m Z m Z d d l Z d d l Z d d l m Z m Z i d d d d d Z d S( u Import related utilities.i ( t absolute_importt unicode_literalsN( t reraiset string_tu .c K@ s8 | d k r t j } n t | t s+ | S| j | p= | } d | k rR d n | } | j | \ } } } | s d | r | n | } } n yv y | | d | | } Wn? t k rï } t t t d j | | t j d n X| rt | | S| SWn) t t f k r3| d k r4 q4n X| S( u¶ Get symbol by qualified name. The name should be the full dot-separated path to the class:: modulename.ClassName Example:: celery.concurrency.processes.TaskPool ^- class name or using ':' to separate module and symbol:: celery.concurrency.processes:TaskPool If `aliases` is provided, a dict containing short name/long name mappings, the name is looked up in the aliases first. Examples: >>> symbol_by_name('celery.concurrency.processes.TaskPool') <class 'celery.concurrency.processes.TaskPool'> >>> symbol_by_name('default', { ... 'default': 'celery.concurrency.processes.TaskPool'}) <class 'celery.concurrency.processes.TaskPool'> # Does not try to look up non-string names. >>> from celery.concurrency.processes import TaskPool >>> symbol_by_name(TaskPool) is TaskPool True u :t packageu Couldn't import {0!r}: {1}i N( t Nonet importlibt import_modulet isinstanceR t gett rpartitiont ValueErrorR t formatt syst exc_infot getattrt ImportErrort AttributeError( t namet aliasest impR t sept defaultt kwargst module_namet _t cls_namet modulet exc( ( sH /home/tvault/.virtenv/lib/python2.7/site-packages/kombu/utils/imports.pyt symbol_by_name s* ! ( t __doc__t __future__R R R R t kombu.fiveR R R R ( ( ( sH /home/tvault/.virtenv/lib/python2.7/site-packages/kombu/utils/imports.pyt <module> s