1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Replace codecs.open() with open() since codecs.open() deprecated in Python 3.14

This commit is contained in:
Alexander Smorkalov
2026-05-24 16:54:39 +03:00
parent 00d19e1c63
commit 852c3d2fb9
4 changed files with 11 additions and 13 deletions
+3 -3
View File
@@ -489,9 +489,9 @@ class SVG:
f.close()
else:
f = codecs.open(fileName, "w", encoding=encoding)
f.write(self.standalone_xml(encoding=encoding))
f.close()
with open(fileName, "w", encoding=encoding) as f:
f.write(self.standalone_xml(encoding=encoding))
def inkview(self, fileName=None, encoding="utf-8"):
"""View in "inkview", assuming that program is available on your system.