--- a/docutil/docsvg.py Wed May 31 10:38:03 2023 +0200
+++ b/docutil/docsvg.py Wed May 31 10:40:53 2023 +0200
@@ -25,6 +25,7 @@
from dialogs import MessageBoxOnce
@@ -33,8 +34,8 @@
def _get_inkscape_path():
""" Return the Inkscape binary path """
- if wx.Platform == '__WXMSW__':
- from six.moves import winreg
+ if sys.platform.startswith('win32'): tries = [(winreg.HKEY_LOCAL_MACHINE, 'Software\\Classes\\svgfile\\shell\\Inkscape\\command'),
(winreg.HKEY_LOCAL_MACHINE, 'Software\\Classes\\inkscape.svg\\shell\\open\\command'),
--- a/fake_wx.py Wed May 31 10:38:03 2023 +0200
+++ b/fake_wx.py Wed May 31 10:40:53 2023 +0200
@@ -98,6 +98,7 @@
('wx.dataview',['PyDataViewIndexListModel']),
('matplotlib.backends.backend_agg',[]),
+ ('wx.html',['HtmlWindow']), ('mpl_toolkits.mplot3d',[])]:
--- a/svghmi/hmi_tree.py Wed May 31 10:38:03 2023 +0200
+++ b/svghmi/hmi_tree.py Wed May 31 10:40:53 2023 +0200
@@ -150,10 +150,10 @@
# limit size to HMI_HASH_SIZE as in svghmi.c
- return list(map(ord,s.digest()))[:8]
- s.update(str((self.name,self.nodetype)))
+ s.update(self.name.encode() + self.nodetype.encode()) if hasattr(self, "children"):
--- a/svghmi/svghmi.py Wed May 31 10:38:03 2023 +0200
+++ b/svghmi/svghmi.py Wed May 31 10:40:53 2023 +0200
@@ -427,13 +427,12 @@
InkscapeGeomColumns = ["Id", "x", "y", "w", "h"]
inkpath = get_inkscape_path()
self.FatalError("SVGHMI: inkscape is not installed.")
svgpath = self._getSVGpath()
status, result, _err_result = ProcessLogger(self.GetCTRoot().logger,
- '"' + inkpath + '" -S "' + svgpath + '"',
+ [inkpath, '-S', svgpath], @@ -611,7 +610,7 @@
# print(transform.xslt.error_log)
# print(etree.tostring(result.xslt_profile,pretty_print=True))
- with open(hash_path, 'wb') as digest_file:
+ with open(hash_path, 'w') as digest_file: digest_file.write(digest)
self.GetCTRoot().logger.write(" No changes - XSLT transformation skipped\n")
@@ -677,14 +676,14 @@
factory = HMIWebSocketServerFactory()
factory.setProtocolOptions(maxConnections={maxConnections})
- svghmi_root.putChild("ws", WebSocketResource(factory))
+ svghmi_root.putChild(b"ws", WebSocketResource(factory)) svghmi_listener = reactor.listenTCP({port}, Site(svghmi_root), interface='{interface}')
svghmi_servers["{interface}:{port}"] = (svghmi_root, svghmi_listener, path_list)
defaultType='application/xhtml+xml'))