ATLAS Offline Software
|
Functions | |
def | has_wildcards (filename) |
def | find_file_split (filename, dirlist=[os.getcwd()], access=os.R_OK, depth=0) |
def | find_file (filename, dirlist=[os.getcwd()], access=os.R_OK, depth=0) |
def | find_files_split (filename, dirlist, access, depth) |
def | find_files (filename, dirlist, access, depth) |
def | find_file_env (filename, env_var_name, access=os.R_OK, sep=defaultPathSeps, depth=0) |
def | find_files_env (filename, env_var_name, access=os.R_OK, sep=defaultPathSeps, depth=0) |
def | find_libraries (lib) |
Variables | |
__doc__ | |
LD_LIBRARY_PATH | |
filenameWildCards | |
filenameWildCardsCompiled | |
defaultPathSeps | |
_libraryNameRE | |
filelist | |
print ("Checking files %s..." % fullfile) More... | |
dir | |
print ("Trying %s..." % f) More... | |
subdirlist | |
fulldir | |
def python.envutil.find_file | ( | filename, | |
dirlist = [ os.getcwd() ] , |
|||
access = os.R_OK , |
|||
depth = 0 |
|||
) |
Search for file <filename> with access rights <access> (see os.access()) in directory list <dirlist>, Search into directory tree of each directory up to depth <depth>. The default directory list is a list containing only the current working directory. <depth> = 0 : only search in directories given in list. <depth> > 0 : descend deeper into the directory tree up to max <depth> levels. <depth> < 0 : ascend upwards into the directory tree up to max -<depth> levels.
Definition at line 85 of file envutil.py.
def python.envutil.find_file_env | ( | filename, | |
env_var_name, | |||
access = os.R_OK , |
|||
sep = defaultPathSeps , |
|||
depth = 0 |
|||
) |
Search for file <filename> with access rights <access> (see os.access()) in directory list given as a <sep> separated list of paths in environment variable <env_var_name>. Search into directory tree of each directory up to depth <depth> (0=don't descend at all).
Definition at line 178 of file envutil.py.
def python.envutil.find_file_split | ( | filename, | |
dirlist = [ os.getcwd() ] , |
|||
access = os.R_OK , |
|||
depth = 0 |
|||
) |
Search for file <filename> with access rights <access> (see os.access()) in directory list <dirlist>. Search into directory tree of each directory in <dirlist> up to depth <depth>. The default directory list is a list containing only the current working directory. No wildcards are allowed in <filename>. <depth> = 0 : only search in directories given in list. <depth> > 0 : descend deeper into the directory tree up to max <depth> levels. <depth> < 0 : ascend upwards into the directory tree up to max -<depth> levels. It returns 2-tuple (dir,file) where: file=<filename> if no wildcards, or the actual (local) match to <filename> if wildcarded. dir=the directory where <file> was found (from <dirlist>, or from a subdir if depth > 0) If no file is found, it returns None.
Definition at line 30 of file envutil.py.
def python.envutil.find_files | ( | filename, | |
dirlist, | |||
access, | |||
depth | |||
) |
Search for all (regular) files that match <filename> with access rights <access> (see os.access()) in directory list <dirlist>. Search is done into subdirectories each directory up to depth <depth>. The default value for <dirlist> is the current working directory. If the same file (without the directory name) is found in more than one places, only the first match is kept. <filename> : can contain wildcards as used on the unix command line. <depth> = 0 : only search in directories given in list. <depth> < 0 : treated as = 0 <depth> > 0 : descend deeper into the directory tree up to max <depth> levels. It returns a list of filenames with full pathnames. If none is found, an empty list is returned.
Definition at line 165 of file envutil.py.
def python.envutil.find_files_env | ( | filename, | |
env_var_name, | |||
access = os.R_OK , |
|||
sep = defaultPathSeps , |
|||
depth = 0 |
|||
) |
Search for all files that match <filename> with access rights <access> (see os.access()) in directory list given as a <sep> (a regular expression) separated list of paths in environment variable <env_var_name>. <filename> can contain wildcards as used on the unix command line. Search into directory tree of each directory up to depth <depth> (0=don't descend at all).
Definition at line 190 of file envutil.py.
def python.envutil.find_files_split | ( | filename, | |
dirlist, | |||
access, | |||
depth | |||
) |
Search for all (regular) files that match <filename> with access rights <access> (see os.access()) in directory list <dirlist>. Search is done into subdirectories each directory up to depth <depth>. The default value for <dirlist> is the current working directory. If the same file (without the directory name) is found in more than one places, only the first match is kept. <filename> : can contain wildcards as used on the unix command line. <depth> = 0 : only search in directories given in list. <depth> < 0 : treated as = 0 <depth> > 0 : descend deeper into the directory tree up to max <depth> levels. It returns a list of 2-tuples (dir,file) where file=<filename> if no wildcards, or the actual (local) match to <filename> if wildcarded. dir=the directory where <file> was found (from <dirlist>, or from a subdir if depth > 0) If none is found, an empty list is returned.
Definition at line 99 of file envutil.py.
def python.envutil.find_libraries | ( | lib | ) |
Search for libraries in LD_LIBRARY_PATH. Return list of full paths of libraries if found. <lib> can contain wildcards, in which case all files matching the wildcard will be returned. If the same file appears in several paths, the first one found will be taken.
Definition at line 203 of file envutil.py.
def python.envutil.has_wildcards | ( | filename | ) |
Return boolean indicating if the filename contains any unix shell filename wildcards
Definition at line 22 of file envutil.py.
|
private |
Definition at line 6 of file envutil.py.
|
private |
Definition at line 19 of file envutil.py.
python.envutil.defaultPathSeps |
Definition at line 16 of file envutil.py.
python.envutil.dir |
print ("Trying %s..." % f)
print ("==> Adding %s to list from %s" % (f,dir)) print ("==> Already have %s in list" % (base))
Definition at line 148 of file envutil.py.
python.envutil.filelist |
print ("Checking files %s..." % fullfile)
Definition at line 133 of file envutil.py.
python.envutil.filenameWildCards |
Definition at line 12 of file envutil.py.
python.envutil.filenameWildCardsCompiled |
Definition at line 13 of file envutil.py.
python.envutil.fulldir |
Definition at line 153 of file envutil.py.
python.envutil.LD_LIBRARY_PATH |
Definition at line 9 of file envutil.py.
python.envutil.subdirlist |
Definition at line 151 of file envutil.py.