Did I find the right examples for you? yes no

All Samples(22114)  |  Call(22114)  |  Derive(0)  |  Import(0)
__import__(name, globals={}, locals={}, fromlist=[], level=-1) -> module

Import a module. Because this function is meant for use by the Python
interpreter and not for general use it is better to use
importlib.import_module() to programmatically import a module.

The globals argument is only used to determine the context;
they are not modified.  The locals argument is unused.  The fromlist
should be a list of names to emulate ``from name import ...'', or an
empty list to emulate ``import name''.(more...)

src/p/e/personis-0.933/personis/examples/aelog/oauth2client/client.py   personis(Download)
    module = data['_module']
    try:
      m = __import__(module)
    except ImportError:
      # In case there's an object from the old package structure, update it
      module = module.replace('.apiclient', '')
      m = __import__(module)
 
    m = __import__(module, fromlist=module.split('.')[:-1])

src/e/n/enterprise-toolkit-HEAD/api_sample/third_party/oauth2client/client.py   enterprise-toolkit(Download)
    module = data['_module']
    try:
      m = __import__(module)
    except ImportError:
      # In case there's an object from the old package structure, update it
      module = module.replace('.apiclient', '')
      m = __import__(module)
 
    m = __import__(module, fromlist=module.split('.')[:-1])

src/o/p/OpenSesame-HEAD/openexp/sampler.py   OpenSesame(Download)
	def __init__(self, experiment, src):
 
		backend = experiment.sampler_backend		
		debug.msg('morphing into %s' % backend)
		mod = __import__('openexp._sampler.%s' % backend, fromlist=['dummy'])			
	backend = experiment.sampler_backend		
	debug.msg('morphing into %s' % backend)
	mod = __import__('openexp._sampler.%s' % backend, fromlist=['dummy'])			
	mod.init_sound(experiment)
 
	backend = experiment.sampler_backend		
	debug.msg('morphing into %s' % backend)
	mod = __import__('openexp._sampler.%s' % backend, fromlist=['dummy'])			
	mod.close_sound(experiment)
 

src/m/i/mirror-counter-sample-python-HEAD/lib/oauth2client/client.py   mirror-counter-sample-python(Download)
    module = data['_module']
    try:
      m = __import__(module)
    except ImportError:
      # In case there's an object from the old package structure, update it
      module = module.replace('.apiclient', '')
      m = __import__(module)
 
    m = __import__(module, fromlist=module.split('.')[:-1])

src/h/e/helipad-HEAD/sample-app/helipad.py   helipad(Download)
  if isinstance(module, basestring):
    components = module.split('.')
    module = __import__(module, globals(), locals(), [], -1)
 
    for component in components[1:]:
 
  # Return a reference to this module (so that we can string together method calls)
  return __import__('helipad', globals(), locals(), [], -1)
 
def template_root(directory=None):
 
  # Return a reference to this module (so that we can string together method calls)
  return __import__('helipad', globals(), locals(), [], -1)
 
def app(*args, **kwargs):

src/f/l/flask-empty-HEAD/examples/blog_example/main.py   flask-empty(Download)
def __import_variable(blueprint_path, module, variable_name):
    path = '.'.join(blueprint_path.split('.') + [module])
    mod = __import__(path, fromlist=[variable_name])
    return getattr(mod, variable_name)
 
 
def config_str_to_obj(cfg):
    if isinstance(cfg, basestring):
        module = __import__('config', fromlist=[cfg])

src/p/y/Pymol-script-repo-HEAD/modules/pdb2pqr/contrib/ZSI-2.1-a1/doc/examples/server/receive_request/simple/mod_python/mod_python.py   Pymol-script-repo(Download)
from ZSI import dispatch
from mod_python import apache
 
mod = __import__('encodings.utf_8', globals(), locals(), '*')
mod = __import__('encodings.utf_16_be', globals(), locals(), '*')

src/p/y/PyGLy-HEAD/pygly/examples/run_demo.py   PyGLy(Download)
    is_core = profiles[ args.opengl_profile ]
 
    scene_module = __import__( demos[ args.demo ], fromlist=[""] )
    scene = scene_module.Scene( is_core )
 
    app_module = __import__( applications[ args.platform ], fromlist=[""] )

src/d/j/django-hotsauce-0.5.0/examples/lib/product/admin.py   Django-hotsauce(Download)
        function_name = attribute.validation.split('.')[-1]
        import_name = '.'.join(attribute.validation.split('.')[:-1])
        import_module = __import__(import_name, fromlist=[function_name])
        validation_function = getattr(import_module, function_name)
        success, valid_value = validation_function(value, product)

src/p/e/personis-0.933/personis/examples/aelog/apiclient/http.py   personis(Download)
    # Find and call the right classmethod from_json() to restore the object.
    module = data['_module']
    m = __import__(module, fromlist=module.split('.')[:-1])
    kls = getattr(m, data['_class'])
    from_json = getattr(kls, 'from_json')

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