~kevang/mnemosyne-proj/grade-shortcuts-improvements

« back to all changes in this revision

Viewing changes to mnemosyne/mnemosyne/libmnemosyne/database.py

  • Committer: Peter Bienstman
  • Date: 2008-08-01 18:33:05 UTC
  • Revision ID: peter.bienstman@ugent.be-20080801183305-vadbiuurs4t86egc
Work on card (in progress).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#
5
5
##############################################################################
6
6
 
7
 
from plugin import Plugin
 
7
from component import Component
8
8
 
9
9
 
10
10
 
12
12
#
13
13
# Database
14
14
#
15
 
#  TODO: see if we need to break up this code
16
 
#
17
15
#  TODO: load_failed mechanism, to prevent overwriting a database which
18
16
#  failed to load.
19
17
#
20
18
##############################################################################
21
19
 
22
 
class Database(Plugin):
23
 
    
24
 
    ##########################################################################
25
 
    #
26
 
    # __init__
27
 
    #
28
 
    ##########################################################################
29
 
    
30
 
    def __init__(self, widget,
31
 
                 name, description, can_be_unregistered=True):
32
 
 
33
 
        self.type                = "batabase"
34
 
        self.name                = name
35
 
        self.description         = description
36
 
        self.can_be_unregistered = can_be_unregistered
37
 
 
38
 
 
39
 
        
 
20
class Database(Component):
 
21
            
40
22
    ##########################################################################
41
23
    #
42
24
    # Functions to be implemented by the actual database.