Package param :: Class resolve_path
[hide private]
[frames] | no frames]

Class resolve_path

source code


Find the path to an existing file, searching the paths specified in the search_paths parameter if the filename is not absolute, and converting a UNIX-style path to the current OS's format if necessary.

To turn a supplied relative path into an absolute one, the path is appended to paths in the search_paths parameter, in order, until the file is found.

An IOError is raised if the file is not found.

Similar to Python's os.path.abspath(), except more search paths than just os.getcwd() can be used, and the file must exist.

Nested Classes [hide private]

Inherited from parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__call__(self, path, **params) source code

Inherited from parameterized.ParameterizedFunction: __reduce__, __str__, script_repr

Inherited from parameterized.Parameterized: __getstate__, __init__, __repr__, __setstate__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, set_default, set_dynamic_time_fn, set_param, state_pop, state_push, verbose, warning

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from parameterized.ParameterizedFunction: instance

Inherited from parameterized.Parameterized: params, print_param_defaults

Static Methods [hide private]

Inherited from parameterized.ParameterizedFunction: __new__

Class Variables [hide private]
  search_paths = List(default= [os.getcwd()], pickle_default_val...
Prepended to a non-relative path, in order, until a file is found.
  __params = {'name': <param.parameterized.String object at 0xa2...
dict() -> new empty dictionary.
  name = <param.parameterized.String object at 0xa2ff92c>
String identifier for this object.

Inherited from parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, path, **params)
(Call operator)

source code 
Overrides: parameterized.ParameterizedFunction.__call__

Class Variable Details [hide private]

search_paths

Prepended to a non-relative path, in order, until a file is found.
Value:
List(default= [os.getcwd()], pickle_default_value= False, doc= """
        Prepended to a non-relative path, in order, until a file is
        found.""")

__params

dict() -> new empty dictionary.
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs.
dict(seq) -> new dictionary initialized as if via:
    d = {}
    for k, v in seq:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

Value:
{'name': <param.parameterized.String object at 0xa2ff92c>,
 'print_level': <param.parameterized.Parameter object at 0xa30387c>,
 'search_paths': <param.List object at 0xa2ff72c>}