src/eric7/eric7_ide.py

branch
eric7
changeset 9413
80c06d472826
parent 9399
fcf9b48d8a0e
child 9429
b2db3a67525c
--- a/src/eric7/eric7_ide.py	Tue Oct 18 16:05:20 2022 +0200
+++ b/src/eric7/eric7_ide.py	Tue Oct 18 16:06:21 2022 +0200
@@ -34,9 +34,6 @@
 ]
 restartArgs = [arg for arg in sys.argv[1:] if arg.split("=", 1)[0] in restartArgsList]
 
-if os.path.dirname(__file__) not in sys.path:
-    sys.path.insert(1, os.path.dirname(__file__))
-
 try:
     from PyQt6.QtCore import qWarning, QLibraryInfo, QTimer, QCoreApplication
 except ImportError:
@@ -72,7 +69,7 @@
 
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
-        import Globals
+        from eric7 import Globals
 
         configDir = arg.replace("--config=", "")
         Globals.setConfigDir(configDir)
@@ -90,9 +87,8 @@
 
 # make Third-Party package available as a packages repository
 sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Jasy"))
-sys.path.insert(2, os.path.join(os.path.dirname(__file__), "DebugClients", "Python"))
 
-from EricWidgets.EricApplication import EricApplication
+from eric7.EricWidgets.EricApplication import EricApplication
 
 
 def handleSingleApplication(ddindex):
@@ -101,7 +97,7 @@
 
     @param ddindex index of a '--' option in the options list
     """
-    from EricWidgets.EricSingleApplication import EricSingleApplicationClient
+    from eric7.EricWidgets.EricSingleApplication import EricSingleApplicationClient
 
     client = EricSingleApplicationClient()
     res = client.connect()
@@ -155,9 +151,8 @@
     @param excValue exception value
     @param tracebackobj traceback object
     """
-    from UI.Info import BugAddress
-    import Utilities
-    import Globals
+    from eric7.UI.Info import BugAddress
+    from eric7 import Globals, Utilities
 
     # Workaround for a strange issue with QScintilla
     if str(excValue) == "unable to convert a QVariant back to a Python object":
@@ -234,8 +229,8 @@
     """
     Main entry point into the application.
     """
-    from Globals import AppInfo
-    import Globals
+    from eric7 import Globals
+    from eric7.Globals import AppInfo
 
     global app, args, mainWindow, splash, restartArgs, inMainLoop
 
@@ -292,7 +287,7 @@
         pathList.insert(0, exeDir)
     os.environ["PATH"] = os.pathsep.join(pathList)
 
-    from Toolbox import Startup
+    from eric7.Toolbox import Startup
 
     # set the library paths for plugins
     Startup.setLibraryPaths()
@@ -307,7 +302,7 @@
     ddindex = Startup.handleArgs(sys.argv, appinfo)
 
     logging.debug("Importing Preferences")
-    import Preferences
+    from eric7 import Preferences
 
     if Preferences.getUI("SingleApplicationMode"):
         handleSingleApplication(ddindex)
@@ -319,7 +314,7 @@
     Startup.initializeResourceSearchPath(app)
 
     # generate and show a splash window, if not suppressed
-    from UI.SplashScreen import SplashScreen, NoneSplashScreen
+    from eric7.UI.SplashScreen import SplashScreen, NoneSplashScreen
 
     if "--no-splash" in sys.argv and sys.argv.index("--no-splash") < ddindex:
         sys.argv.remove("--no-splash")
@@ -388,14 +383,14 @@
     loc = Startup.loadTranslators(qtTransDir, app, ("qscintilla",))
 
     # Initialize SSL stuff
-    from EricNetwork.EricSslUtilities import initSSL
+    from eric7.EricNetwork.EricSslUtilities import initSSL
 
     initSSL()
 
     splash.showMessage(QCoreApplication.translate("eric7_ide", "Starting..."))
     # We can only import these after creating the EricApplication because they
     # make Qt calls that need the EricApplication to exist.
-    from UI.UserInterface import UserInterface
+    from eric7.UI.UserInterface import UserInterface
 
     splash.showMessage(
         QCoreApplication.translate("eric7_ide", "Generating Main Window...")
@@ -418,7 +413,7 @@
     QTimer.singleShot(0, uiStartUp)
 
     # generate a graphical error handler
-    from EricWidgets import EricErrorMessage
+    from eric7.EricWidgets import EricErrorMessage
 
     eMsg = EricErrorMessage.qtHandler()
     eMsg.setMinimumSize(600, 400)

eric ide

mercurial