Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/VLC/modules/gui/qt/scripts/   (VLC Media Plyer ©)  Datei vom 23.9.2026 mit Größe 1 kB image not shown  

Quelle  qrc2rsp.py   Sprache: Python

 

import xml.etree.ElementTree as ET
import os
import sys
import argparse

def parseQrc(fdin, fdout):
    tree = ET.parse(fdin)
    root = tree.getroot()
    for qresources in root:
        if qresources.tag != "qresource":
            raise RuntimeError("unexpected qrc format")
        prefix = qresources.get("prefix")
        for file in qresources:
            if file.tag != "file":
                raise RuntimeError("unexpected qrc format")
            alias = file.get("alias")
            fdout.write(os.path.join(prefix, alias))
            fdout.write("\n")


if __name__ == "__main__":
    parser = argparse.ArgumentParser(
        description="This program generates a list of files from Qt qrc file, this file may be used as an input for QmlCachegen"
    )
    parser.add_argument("-o", "--output", type=argparse.FileType('w'),
                        default=sys.stdout)
    parser.add_argument("FILES", nargs="*")

    args = parser.parse_args()
    for f in args.FILES:
        with open(f) as fdin:
            parseQrc(fdin, args.output)

Messung
CHZG
86999994

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.