Package ivs :: Module config
[hide private]
[frames] | no frames]

Module config

source code

Global configuration of the IvS package.

Usage: $ python config.py compile

Functions [hide private]
str
get_datafile(relative_path, basename)
Reconstruct the location of a data file and check whether it exists.
source code
list of str
glob(relative_path, arg='*')
Glob the files in a relative path.
source code
Variables [hide private]
  data_dirs = [os.getenv('ivsdata'), '/STER/pieterd/IVSDATA/', '...
  ivs_dirs = dict(coralie= '/STER/coralie/', hermes= '/STER/merc...
Function Details [hide private]

get_datafile(relative_path, basename)

source code 

Reconstruct the location of a data file and check whether it exists.

If the file exists, it will return the absolute path of the filename.

If the file does not exist, it will raise an IOError.

Parameters:
  • relative_path (str) - relative path starting from main data directory tree
  • basename (str) - filename
Returns: str
absolute path to the file

glob(relative_path, arg='*')

source code 

Glob the files in a relative path.

Parameters:
  • relative_path (str) - relative path starting from main data directory tree
  • arg (str) - argument to use in glob
Returns: list of str
sorted list of files

Variables Details [hide private]

data_dirs

Value:
[os.getenv('ivsdata'), '/STER/pieterd/IVSDATA/', '/STER/kristofs/IVSda\
ta', '/STER/jorisv/IVSDATA/', '/STER/kenneth/Python_repository/', '/ho\
me/ben/public_html/opacities', '/STER/michelh/IVSDATA/']

ivs_dirs

Value:
dict(coralie= '/STER/coralie/', hermes= '/STER/mercator/hermes/')