Package screenlets :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Classes [hide private]
  IniReader
A simple config/ini-reader class.
  Notifier
A simple and conveniet wrapper for the notification-service.
Functions [hide private]
 
_(s) source code
 
find_first_screenlet_path(screenlet_name)
Scan the SCREENLETS_PATH for the first occurence of screenlet "name" and return the full path to it.
source code
 
get_screenlet_metadata(screenlet_name)
Returns a dict with name, info, author and version of the given screenlet.
source code
 
list_available_screenlets()
Scan the SCREENLETS_PATHs for all existing screenlets and return their names (without trailing "Screenlet") as a list of strings.
source code
 
list_running_screenlets()
Returns a list with names of running screenlets or None if no Screenlet is currently running.
source code
 
_contains_path(string)
Internal function: Returns true if the given string contains one of the SCREENLETS_PATH entries.
source code
 
list_running_screenlets2()
Returns a list with names of running screenlets.
source code
 
get_screenlet_process(name)
Returns the PID of the given screenlet (if running) or None.
source code
Function Details [hide private]

find_first_screenlet_path(screenlet_name)

source code 
Scan the SCREENLETS_PATH for the first occurence of screenlet "name" and return the full path to it. This function is used to get the theme/data directories for a Screenlet.

get_screenlet_metadata(screenlet_name)

source code 
Returns a dict with name, info, author and version of the given screenlet. Use with care because it always imports the screenlet module and shouldn't be used too often due to performance issues.

list_running_screenlets()

source code 
Returns a list with names of running screenlets or None if no Screenlet is currently running. Function returns False if an error happened!

list_running_screenlets2()

source code 
Returns a list with names of running screenlets. The list can be empty if no Screenlet is currently running.