From d40bbd4dace7f4c3b5208669a2855b3e49ca5cd2 Mon Sep 17 00:00:00 2001 From: "Patrick K. O'Brien" Date: Mon, 15 Mar 2004 13:42:37 +0000 Subject: [PATCH] Eliminate relative imports and make them more py2exe friendly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/py/PyAlaCarte.py | 5 ++--- wxPython/wx/py/PyAlaMode.py | 5 ++--- wxPython/wx/py/PyAlaModeTest.py | 5 ++--- wxPython/wx/py/PyCrust.py | 5 ++--- wxPython/wx/py/PyShell.py | 4 ++-- wxPython/wx/py/PyWrap.py | 7 ++++--- 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/wxPython/wx/py/PyAlaCarte.py b/wxPython/wx/py/PyAlaCarte.py index c665e4f4b6..561224489c 100644 --- a/wxPython/wx/py/PyAlaCarte.py +++ b/wxPython/wx/py/PyAlaCarte.py @@ -5,12 +5,11 @@ __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] import wx +from wx import py import os import sys -import editor - class App(wx.App): """PyAlaCarte standalone application.""" @@ -20,7 +19,7 @@ class App(wx.App): def OnInit(self): wx.InitAllImageHandlers() - self.frame = editor.EditorFrame(filename=self.filename) + self.frame = py.editor.EditorFrame(filename=self.filename) self.frame.Show() self.SetTopWindow(self.frame) return True diff --git a/wxPython/wx/py/PyAlaMode.py b/wxPython/wx/py/PyAlaMode.py index 06d1583657..8330cc3c3a 100644 --- a/wxPython/wx/py/PyAlaMode.py +++ b/wxPython/wx/py/PyAlaMode.py @@ -5,12 +5,11 @@ __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] import wx +from wx import py import os import sys -import editor - class App(wx.App): """PyAlaMode standalone application.""" @@ -20,7 +19,7 @@ class App(wx.App): def OnInit(self): wx.InitAllImageHandlers() - self.frame = editor.EditorNotebookFrame(filename=self.filename) + self.frame = py.editor.EditorNotebookFrame(filename=self.filename) self.frame.Show() self.SetTopWindow(self.frame) return True diff --git a/wxPython/wx/py/PyAlaModeTest.py b/wxPython/wx/py/PyAlaModeTest.py index 3ae9cb600a..d1c02e0907 100755 --- a/wxPython/wx/py/PyAlaModeTest.py +++ b/wxPython/wx/py/PyAlaModeTest.py @@ -5,12 +5,11 @@ __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] import wx +from wx import py import os import sys -import editor - class App(wx.App): """PyAlaModeTest standalone application.""" @@ -20,7 +19,7 @@ class App(wx.App): def OnInit(self): wx.InitAllImageHandlers() - self.frame = editor.EditorShellNotebookFrame(filename=self.filename) + self.frame = py.editor.EditorShellNotebookFrame(filename=self.filename) self.frame.Show() self.SetTopWindow(self.frame) return True diff --git a/wxPython/wx/py/PyCrust.py b/wxPython/wx/py/PyCrust.py index ce961a8d07..b9a222763e 100644 --- a/wxPython/wx/py/PyCrust.py +++ b/wxPython/wx/py/PyCrust.py @@ -13,15 +13,14 @@ __revision__ = "$Revision$"[11:-2] import wx - class App(wx.App): """PyCrust standalone application.""" def OnInit(self): import wx + from wx import py wx.InitAllImageHandlers() - from crust import CrustFrame - self.frame = CrustFrame() + self.frame = py.crust.CrustFrame() self.frame.SetSize((800, 600)) self.frame.Show() self.SetTopWindow(self.frame) diff --git a/wxPython/wx/py/PyShell.py b/wxPython/wx/py/PyShell.py index 54cef8a71e..c800dc4d9c 100644 --- a/wxPython/wx/py/PyShell.py +++ b/wxPython/wx/py/PyShell.py @@ -18,9 +18,9 @@ class App(wx.App): def OnInit(self): import wx + from wx import py wx.InitAllImageHandlers() - from shell import ShellFrame - self.frame = ShellFrame() + self.frame = py.shell.ShellFrame() self.frame.SetSize((750, 525)) self.frame.Show() self.SetTopWindow(self.frame) diff --git a/wxPython/wx/py/PyWrap.py b/wxPython/wx/py/PyWrap.py index 333ad8d064..99a91f1833 100644 --- a/wxPython/wx/py/PyWrap.py +++ b/wxPython/wx/py/PyWrap.py @@ -5,14 +5,15 @@ __author__ = "Patrick K. O'Brien " __cvsid__ = "$Id$" __revision__ = "$Revision$"[11:-2] +import wx +from wx import py + import os import sys -import wx -from wx.py.crust import CrustFrame def wrap(app): wx.InitAllImageHandlers() - frame = CrustFrame() + frame = py.crust.CrustFrame() frame.SetSize((750, 525)) frame.Show(True) frame.shell.interp.locals['app'] = app -- 2.45.2