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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import re
  5. __all__ = [
  6.     'framework_info']
  7. STRICT_FRAMEWORK_RE = re.compile('(?x)\n(?P<location>^.*)(?:^|/)\n(?P<name>\n    (?P<shortname>\\w+).framework/\n    (?:Versions/(?P<version>[^/]+)/)?\n    (?P=shortname)\n    (?:_(?P<suffix>[^_]+))?\n)$\n')
  8.  
  9. def framework_info(filename):
  10.     is_framework = STRICT_FRAMEWORK_RE.match(filename)
  11.     if not is_framework:
  12.         return None
  13.     return is_framework.groupdict()
  14.  
  15.  
  16. def test_framework_info():
  17.     
  18.     def d(location = None, name = None, shortname = None, version = None, suffix = None):
  19.         return dict(location = location, name = name, shortname = shortname, version = version, suffix = suffix)
  20.  
  21.  
  22. if __name__ == '__main__':
  23.     test_framework_info()
  24.  
  25.