def insert_system_path(opts, paths):
 if isinstance(paths, str):
  paths = [paths]
 for path in paths:
  path_options = {'path': path, 'root_dir': opts['root_dir']}
  prepend_root_dir(path_options, path_options)
  if (os.path.isdir(path_options['path']) and (path_options['path'] not in sys.path)):
   sys.path.insert(0, path_options['path'])

def insert_system_path ( opts , paths ) : if isinstance ( paths , str ) : paths = [ paths ] for path in paths : path_options = { 'path' : path , 'root_dir' : opts [ 'root_dir' ] } prepend_root_dir ( path_options , path_options ) if ( os . path . isdir ( path_options [ 'path' ] ) and ( path_options [ 'path' ] not in sys . path ) ) : sys . path . insert ( 0 , path_options [ 'path' ] )
inserts path into python path taking into consideration root_dir option .