When using the SVG.write_xml() method, I cannot simply hand it a pathlib.Path() object for the new filename. Instead, an exception is raised.
File "C:\Python311\Lib\site-packages\svgelements\svgelements.py", line 3429, in write_xml
write(self, f)
File "C:\Python311\Lib\site-packages\svgelements\svgelements.py", line 9362, in write
if f.lower().endswith("svgz"):
^^^^^^^
AttributeError: 'WindowsPath' object has no attribute 'lower'. Did you mean: 'owner'?
This isn't a huge issue, since I can just do something like svg.write_xml(str(file_path)). However, the SVG.parse() method does work with Path() objects as input, and it would be nice if the other did as well for uniformity's sake.
When using the
SVG.write_xml()
method, I cannot simply hand it apathlib.Path()
object for the new filename. Instead, an exception is raised.This isn't a huge issue, since I can just do something like
svg.write_xml(str(file_path))
. However, theSVG.parse()
method does work withPath()
objects as input, and it would be nice if the other did as well for uniformity's sake.