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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import re
  5. __all__ = [
  6.     'dylib_info']
  7. DYLIB_RE = re.compile('(?x)\n(?P<location>^.*)(?:^|/)\n(?P<name>\n    (?P<shortname>\\w+?)\n    (?:\\.(?P<version>[^._]+))?\n    (?:_(?P<suffix>[^._]+))?\n    \\.dylib$\n)\n')
  8.  
  9. def dylib_info(filename):
  10.     is_dylib = DYLIB_RE.match(filename)
  11.     if not is_dylib:
  12.         return None
  13.     return is_dylib.groupdict()
  14.  
  15.  
  16. def test_dylib_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_dylib_info()
  24.  
  25.