Message376727
Op vrijdag 11 september 2020 11:31:29 CEST schreef u:
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
>
> parse() is an instance method. It should be called as tree.parse(f) (where
> tree is an instance of ElementTree), not ElementTree.parse(f).
>
> ----------
I have no idea how to make tree an instance.
Reading the documentation,
https://docs.python.org/2/library/xml.etree.elementtree.html,
it shows as an example:
import xml.etree.ElementTree as ET
tree = ET.parse('country_data.xml')
which is exactly what the program looks like and what my small python script
does without an error.
--
fr.gr.
Freek de Kruijf |
|
Date |
User |
Action |
Args |
2020-09-11 12:13:42 | f.de.kruijf | set | recipients:
+ f.de.kruijf |
2020-09-11 12:13:42 | f.de.kruijf | link | issue41759 messages |
2020-09-11 12:13:42 | f.de.kruijf | create | |
|