From 764abb41bf43c93621d70669a657e36d0e7134c6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 Mar 2020 13:47:50 -0700 Subject: [PATCH] Don't use relative imports in the tools scripts --- wx/tools/img2png.py | 2 +- wx/tools/img2py.py | 2 +- wx/tools/img2xpm.py | 2 +- wx/tools/wxget_docs_demo.py | 5 +---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wx/tools/img2png.py b/wx/tools/img2png.py index bfe6ab2a..77585705 100644 --- a/wx/tools/img2png.py +++ b/wx/tools/img2png.py @@ -37,7 +37,7 @@ Options: import sys import wx -from . import img2img +from wx.tools import img2img app = None def main(): diff --git a/wx/tools/img2py.py b/wx/tools/img2py.py index 7f0eff2c..b2637cc9 100644 --- a/wx/tools/img2py.py +++ b/wx/tools/img2py.py @@ -88,7 +88,7 @@ import sys import tempfile import wx -from . import img2img +from wx.tools import img2img try: b64encode = base64.b64encode diff --git a/wx/tools/img2xpm.py b/wx/tools/img2xpm.py index 4cf1d8e8..45e432bb 100644 --- a/wx/tools/img2xpm.py +++ b/wx/tools/img2xpm.py @@ -36,7 +36,7 @@ Options: import sys import wx -from . import img2img +from wx.tools import img2img app = None def main(): diff --git a/wx/tools/wxget_docs_demo.py b/wx/tools/wxget_docs_demo.py index 0d3573b0..e9468918 100644 --- a/wx/tools/wxget_docs_demo.py +++ b/wx/tools/wxget_docs_demo.py @@ -45,10 +45,7 @@ else: from urllib import pathname2url import wx -try: - import wxget -except ImportError: - from . import wxget +from wx.tools import wxget print(sys.version_info, sys.version, sys.argv) APP = None