home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2286 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.8 KB  |  44 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from PyQt4.uic.Compiler.misc import Literal, moduleMember
  5.  
  6. class ProxyType(type):
  7.     
  8.     def __init__(*args):
  9.         type.__init__(*args)
  10.         for cls in args[0].__dict__.values():
  11.             if type(cls) is ProxyType:
  12.                 cls.module = args[0].__name__
  13.                 continue
  14.         
  15.         if not hasattr(args[0], 'module'):
  16.             args[0].module = ''
  17.         
  18.  
  19.     
  20.     def __getattribute__(cls, name):
  21.         
  22.         try:
  23.             return type.__getattribute__(cls, name)
  24.         except AttributeError:
  25.             LiteralProxyClass = LiteralProxyClass
  26.             import PyQt4.uic.Compiler.qtproxies
  27.             return type(name, (LiteralProxyClass,), {
  28.                 'module': moduleMember(type.__getattribute__(cls, 'module'), type.__getattribute__(cls, '__name__')) })
  29.  
  30.  
  31.     
  32.     def __str__(cls):
  33.         return moduleMember(type.__getattribute__(cls, 'module'), type.__getattribute__(cls, '__name__'))
  34.  
  35.     
  36.     def __or__(self, r_op):
  37.         return Literal('%s|%s' % (self, r_op))
  38.  
  39.     
  40.     def __eq__(self, other):
  41.         return str(self) == str(other)
  42.  
  43.  
  44.