Changeset 2302

Show
Ignore:
Timestamp:
02/17/10 12:46:54 (5 months ago)
Author:
fma
Message:

Added cmp() method

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/papywizard/plugins/abstractPlugin.py

    r2279 r2302  
    8484        self._defineConfig() 
    8585        self._loadConfig() 
     86 
     87    def __cmp__(self, other): 
     88        """ Sort plugins on their name. 
     89        """ 
     90        if self.name < other.name: 
     91            return -1 
     92        elif self.name == other.name: 
     93            return 0 
     94        else: 
     95            return 1 
    8696 
    8797    # Properties