I have a large (maybe 22^56 or so items this time) generator in python 2.7. I'd like to know how many items are in the generator so that I can estimate time to complete the task. Unfortunately when I tried len() of a list comprehension, it killed the whole python instance...
>>> len([i for i in giant_word_list_generator])
Killed: 9
[user@host:~/Documents/work/bin|16:59:28]
$
How can I estimate the number of items in the generator for progress estimation? I would be okay with estimating to the nearest .25 order of magnitude (e.g. 250,000,000 or 50,000)