# Module e.c.u.misc

Part of elisa.core.utils

Miscellaneaous utilities that don't need their own module because they are reasonnably small.

Line # | Kind | Name | Docs
--- | --- | --- | ---
31 | Function | env_var_expand | Expand the given environment variable content. If it contains
69 | Function | env_var_explode_list | Explode a list of values stored in an environment variable as a
98 | Function | un_camelify | Convert CamelCase styled strings to lower_cased style.
121 | Function | is_hildon_desktop_running | Undocumented
147 | Function | get_distro | Undocumented
169 | Function | get_os_name | Undocumented
177 | Function | pkg_resources_copy_dir | Copy a directory recursively using pkg_resources.

def env_var_expand(var_name):

Expand the given environment variable content. If it contains other references to environment variables, they are expanded too.

Supported platforms are win32 and linux.

Example of use:

      >>> env_var_expand('$HOME')
      >>> '/home/phil'

Parameters | var_name | environment variable (type: string )
Returns | (type: string )
Raises | ValueError | if current system's platform is not windows or linux

def env_var_explode_list(var_name, default=''):

Explode a list of values stored in an environment variable as a single string. On win32 the item separator is ';' and on other platforms it is ':'.

Example of use:

      >>> env_var_explode_list('$PATH')
      >>> ['/usr/bin','/bin']

Parameters | var_name | environment variable (type: string )
| default | value to use if environment variable not found (type: string )
Returns | (type: list of strings )

def un_camelify(camel_string):
Convert CamelCase styled strings to lower_cased style.

Parameters | camel_string | CamelStyled string to convert (type: string )
Returns | (type: string )

def is_hildon_desktop_running():
Undocumented
def get_distro():
Undocumented
def get_os_name():
Undocumented
def pkg_resources_copy_dir(resource_spec, resource_dir, dest_dir):
Copy a directory recursively using pkg_resources.