home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / checkbox / registries / link.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.2 KB  |  32 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from checkbox.registry import Registry
  5.  
  6. class LinkRegistry(Registry):
  7.     '''Registry for links.
  8.  
  9.     The default behavior is to express the given maps as a tree of items.
  10.     '''
  11.     
  12.     def __init__(self, link):
  13.         super(LinkRegistry, self).__init__()
  14.         self._link = link
  15.  
  16.     
  17.     def __str__(self):
  18.         return str(self._link)
  19.  
  20.     
  21.     def items(self):
  22.         items = []
  23.         for k, v in self._link.items():
  24.             if isinstance(v, LinkRegistry):
  25.                 continue
  26.             
  27.             items.append((k, v))
  28.         
  29.         return items
  30.  
  31.  
  32.