Last active
December 23, 2015 04:39
-
-
Save kislyuk/6582160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>./test.py | |
<Element '{http://www.mediawiki.org/xml/export-0.8/}sitename' at 0x7f05e97a9398> | |
RPython traceback: | |
File "rpython_jit_metainterp_pyjitpl.c", line 19287, in MIFrame_run_one_step | |
File "rpython_jit_metainterp_pyjitpl.c", line 34476, in handler_residual_call_ir_i | |
File "rpython_jit_metainterp_pyjitpl_1.c", line 30019, in MIFrame_do_residual_call | |
File "rpython_jit_metainterp_pyjitpl_1.c", line 51156, in MetaInterp_vrefs_after_residual_call | |
File "rpython_jit_metainterp_pyjitpl_2.c", line 4017, in MetaInterp_stop_tracking_virtualref | |
Fatal RPython error: AssertionError | |
Aborted (core dumped) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pypy3 | |
import bz2 | |
from xml.etree import ElementTree | |
with bz2.BZ2File("enwiki-latest-pages-articles.xml.bz2") as bz2_fh: | |
root = None | |
i=0 | |
for event, element in ElementTree.iterparse(bz2_fh, events=("start", "end")): | |
if root is None: | |
root = element | |
if event == 'end': | |
if i % 100000 == 0: | |
print(repr(element)) | |
i += 1 | |
if i > 1000000: | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment