done in pyrev:8092 regards xqt
----- Original Nachricht ---- Von: Dmitry Chichkov <[email protected]> An: [email protected] Datum: 09.04.2010 08:41 Betreff: [Pywikipedia-l] a small tweak that adds .7z support to the xmlreader (trunk) > Here's the patch: > > --- pywikipedia/xmlreader.py 2010-03-26 22:45:58.000000000 -0700 > +++ xmlreader.py 2010-04-08 23:35:51.000000000 -0700 > @@ -285,6 +285,9 @@ > if self.filename.endswith('.bz2'): > import bz2 > source = bz2.BZ2File(self.filename) > + if self.filename.endswith('.7z'): > + import subprocess > + source = subprocess.Popen('7za e -bd -so %s 2>/dev/null' % > self.filename, shell=True, stdout=subprocess.PIPE, bufsize=65535).stdout > else: > # assume it's an uncompressed XML file > source = open(self.filename) > > -- Dc987 > > > -------------------------------- > > _______________________________________________ > Pywikipedia-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l > Traumziele - von Beschreibung bis Buchung jetzt kompakt auf den Reise-Seiten von Arcor.de! http://www.arcor.de/rd/footer.reise _______________________________________________ Pywikipedia-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
