Logo Search packages:      
Sourcecode: nanny version File versions  Download package

def src::Chrono::Chrono::__get_application_list (   self,
  categories 
) [private]

Generate the application list from the app files.

Format:
    app_list = [['browser', 'firefox'],
        ['email', 'thunderbird']]

Definition at line 108 of file Chrono.py.

00108                                                 :
        '''Generate the application list from the app files.

        Format:
            app_list = [['browser', 'firefox'],
                        ['email', 'thunderbird']]
        '''

        app_list = [['session', 'gnome-session']]
        for category in categories:
            file_path = '/etc/nanny/applists/' + category
            if os.path.exists(file_path):
                file = open(file_path, 'rb')
                for line in file:
                    if len(line) > 1:
                        app_list.append([category, line[:-1]])

        return app_list


gobject.type_register(Chrono)
gobject.type_register(Chrono)


Generated by  Doxygen 1.6.0   Back to index