commit abffe585054a6b05b060c594dcd29f3c5954faec Author: Frederik Jaeckel Date: Thu Dec 12 12:54:30 2024 +0000 Home hinzugefügt diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..f0dbb90 --- /dev/null +++ b/Home.md @@ -0,0 +1,7 @@ +Factur-x verwendet aus der Python-lib _importlib.resources_ die Funktion _files_. Diese gibt es in Python 3.8 nicht. Als Workaround kann man das umbauen: + + import pathlib + package_path = pathlib.PosixPath('/'.join(__file__.split('/')[:-1] + [xsd_file])) + xsd_etree_obj = etree.parse(package_path.open()) + # xsd_etree_obj = etree.parse(importlib.resources.files(__package__) + # .joinpath(xsd_file).open())