VirtualEnvOnDemand.GlobalEnv
index

# Copyright (c) 2015 Timothy Savannah under terms of LGPLv3. You should have received a copy of this with this distribution as "LICENSE"

#  This file contains things related to the "global" env, used for auto-importing.

 
Modules
       
imp
sys

 
Classes
       
__builtin__.object
VirtualEnvOnDemandImporter

 
class VirtualEnvOnDemandImporter(__builtin__.object)
    VirtualEnvOnDemandImporter - The workhouse of auto-importing. Upon an import that wouldn't resolve, it will try to install the leading package name using pip.
    Failure will still cause a "cannot import" error, but otherwise things will be installed on-demand.
 
  Methods defined here:
find_module(self, fullname, path=None)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
enableOnDemandImporter(tmpDir=None)
enableOnDemandImporter - Calling this method turns on the "on demand" importer. A temporary global env is created, and all failed imports will attempt an installation.
 
   @param tmpDir <str/None> - Temporary directory to use. A subdirectory will be created within this. Defaults to tempdir.gettmpdir()

 
Data
        globalOnDemandVirtualEnv = None
isOnDemandImporterEnabled = False