Package svs_core :: Package utilities :: Module lib
[show private | hide private]
[frames | no frames]

Module svs_core.utilities.lib

Library of helper classes for general purpose use.

Author: Simon Yuill

Contact: simon@lipparosa.org

Copyright: 2005 Simon Yuill

License: GNU GPL version 2 or any later version

Classes
Bunch Lightweight data container class.
Constants Provides support for fixed value constants.
Enumeration Emulates the C Enum function, providing a set of unique values.
GenericPath Provides a general purpose path-style locator for data.
PathBasedCollection Holds data in a nested structure that can be accessed via pathnames.

Exceptions
EnumException  

Function Summary
  encodeValue(value)
Returns encodable version of value.
  isDecodable(obj)
Tests whether an object has an decode methods, and returns True or False.
  isEncodable(obj)
Tests whether an object has an encode methods, and returns True or False.
list parseNumericList(listStr, listSep)
Converts comma separated string into a list of numbers.
  validateFilePath(filepath, create)
Converts filepath to absolute form, expanding the user if necessary, and tests if it exists.

Function Details

encodeValue(value)

Returns encodable version of value.

isDecodable(obj)

Tests whether an object has an decode methods, and returns True or False.

isEncodable(obj)

Tests whether an object has an encode methods, and returns True or False.

parseNumericList(listStr, listSep)

Converts comma separated string into a list of numbers.
Parameters:
listStr - string to parse
           (type=string)
Returns:
list of floats
           (type=list)

validateFilePath(filepath, create=True)

Converts filepath to absolute form, expanding the user if necessary, and tests if it exists. If the directory, or any sub-directory in the path does not exist, can optionally create it (on by default).

Returns validated path. If create is set to false, and the path does not exist, returns None.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:26 2005 http://epydoc.sf.net