コード例 #1
0
ファイル: main.py プロジェクト: BackupTheBerlios/pida-svn
def update_constants(header, pygen):
    try:
        fd = open(header)
        for name, val in parsers.iter_header_constants(fd):
            pygen.dump_constant(name, str(val))
    finally:
        fd.close()
コード例 #2
0
ファイル: main.py プロジェクト: BackupTheBerlios/pida-svn
def update_constants(header, pygen):
    try:
        fd = open(header)
        for name, val in parsers.iter_header_constants(fd):
            pygen.dump_constant(name, str(val))
    finally:
        fd.close()
コード例 #3
0
def test_module(filename):
    import scintilla
    total = 0
    missing = []
    try:
        header = open(filename)
        for name, val in parsers.iter_header_constants(header):
            if not hasattr(scintilla, name):
                missing.append((name, val))
            total += 1
    finally:
        header.close()

    for name, val in missing:
        print "%s = %d" % (name, val)
    print "Compliance: %d/%d" % (total - len(missing), total)
コード例 #4
0
def test_module(filename):
    import scintilla
    total = 0
    missing = []
    try:
        header = open(filename)
        for name, val in parsers.iter_header_constants(header):
            if not hasattr(scintilla, name):
                missing.append((name, val))
            total += 1
    finally:
        header.close()
    
    for name, val in missing:
        print "%s = %d" % (name, val)
    print "Compliance: %d/%d" % (total - len(missing), total)