Sayth Renshaw wrote:
def dataAttr(roots):
"""Get the root object and iter items."""
with open("output/first2.csv", 'w', newline='') as csvf:
race_writer = csv.writer(csvf, delimiter=',')
for meet in roots.iter("meeting"):
The value of roots you're passing in here is a ge
> Steve
> “Cheer up,” they said, “things could be worse.” So I cheered up, and sure
> enough, things got worse.
Loving life.
I first started with a simple with open on a file, which allowed me to use code
that "iter"'s.
for example:
for meet in root.iter("meeting"):
for race in root.ite
On Sat, 1 Oct 2016 06:52 pm, Sayth Renshaw wrote:
> Evening
>
> My file list handler I have created a generator.
>
> Before I created it as a generator I was able to use iter on my lxml root
> objects, now I cannot iter.
lxml root objects have an iter method. Other objects do not.
Thank you f
2016-10-01 12:09 GMT+02:00 Sayth Renshaw :
> My main issue is that usually its just x in ,,, for a generator.
>
> But if I change the code
> for meet in roots.iter("meeting"):
>
> to
> for meet in roots("meeting"):
>
> Well its invalid but I need to be able to reference the node, how do I
> achiev
My main issue is that usually its just x in ,,, for a generator.
But if I change the code
for meet in roots.iter("meeting"):
to
for meet in roots("meeting"):
Well its invalid but I need to be able to reference the node, how do I achieve
this?
Sayth
--
https://mail.python.org/mailman/listinfo/
Evening
My file list handler I have created a generator.
Before I created it as a generator I was able to use iter on my lxml root
objects, now I cannot iter.
± |master U:2 ?:1 ✗| → python3 race.py data/ -e *.xml
Traceback (most recent call last):
File "race.py", line 83, in
dataAttr(roo