Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 3a3caf2030fe9f56b649a0e16a9911a2 > files > 857

PyKDE-devel-3.16.6-3.fc13.i686.rpm

#!/usr/bin/env python
""" About the PyKDE Sampler

Defines the 'about' function to create a KAboutData instance for the
sampler application.
"""
from os.path import dirname, join
from kdecore import KAboutData


appName = 'pykdesampler'
progName = 'PyKDE Sampler'
authorName = 'Troy Melhase'
authorEmail = bugsEmailAddress = 'troy@gci.net'
version = '0.1'
shortDescription = 'The PyKDE Sampler'
licenseType = KAboutData.License_GPL_V2
copyrightStatement = '(c) 2006, %s' % (authorName, )
homePageAddress = 'http://www.riverbankcomputing.co.uk/pykde/'
aboutText = ("The application sampler for PyKDE.")
contributors = [] # module-level global for keeping the strings around; intentional


def about():
    """ creates KAboutData instance for the app

    """
    about = KAboutData(
        appName,
        progName,
        version,
        shortDescription,
        licenseType,
        copyrightStatement,
        aboutText,
        homePageAddress,
        bugsEmailAddress)
    about.addAuthor(authorName, '', authorEmail)

    try:
        contrib = open(join(dirname(__file__), 'contributors.txt'))
        contrib = [line.strip() for line in contrib]
        contrib = [line for line in contrib if not line.startswith('#')]
        for line in contrib:
            try:
                name, task, addr = [s.strip() for s in line.split(',')]
                contributors.append((name, task, addr))                            
            except:
                pass
    except:
        pass

    contributors.sort(lambda a, b:cmp(a[0], b[0]))
    for name, task, addr in contributors:
        about.addCredit(name, task, addr)

    return about