svghmi/svghmi.py
branchpython3
changeset 3750 f62625418bff
parent 3688 c2992796a859
child 3817 3deeda82636a
--- a/svghmi/svghmi.py	Mon Mar 27 10:19:14 2023 +0200
+++ b/svghmi/svghmi.py	Fri Oct 28 12:39:15 2022 +0800
@@ -6,7 +6,7 @@
 #
 # See COPYING file for copyrights details.
 
-from __future__ import absolute_import
+
 import os
 import sys
 import shutil
@@ -307,7 +307,7 @@
     default_cmds={
         "launch":"cmd.exe /c 'start msedge {url}'",
         "watchdog":"cmd.exe /k 'echo watchdog for {url} !'"}
-elif os.environ.has_key("SNAP"):
+elif "SNAP" in os.environ:
     default_cmds={
         "launch":"xdg-open {url}",
         "watchdog":"echo Watchdog for {name} !"}
@@ -443,7 +443,7 @@
         for line in result.split():
             strippedline = line.strip()
             attrs = dict(
-                zip(InkscapeGeomColumns, line.strip().split(',')))
+                list(zip(InkscapeGeomColumns, line.strip().split(','))))
 
             res.append(etree.Element("bbox", **attrs))