src/eric7/Globals/__init__.py

branch
eric7-maintenance
changeset 10941
07cad049002c
parent 10814
ba20efe10336
parent 10926
9ef616cd220d
child 11118
967a88a16a21
--- a/src/eric7/Globals/__init__.py	Sat Aug 31 10:54:50 2024 +0200
+++ b/src/eric7/Globals/__init__.py	Tue Oct 01 11:27:52 2024 +0200
@@ -17,6 +17,8 @@
 
 from eric7.EricUtilities import (  # noqa
     dataString,
+    getConfigDir,
+    setConfigDir,
     strGroup,
     strToQByteArray,
     toBool,
@@ -53,25 +55,6 @@
 recentNameTestFramework = "UTTestFramework"
 recentNameTestEnvironment = "UTEnvironmentName"
 
-configDir = None
-
-
-def getConfigDir():
-    """
-    Module function to get the name of the directory storing the config data.
-
-    @return directory name of the config dir
-    @rtype str
-    """
-    if configDir is not None and os.path.exists(configDir):
-        hp = configDir
-    else:
-        cdn = ".eric7"
-        hp = os.path.join(os.path.expanduser("~"), cdn)
-        if not os.path.exists(hp):
-            os.mkdir(hp)
-    return hp
-
 
 def getInstallInfoFilePath():
     """
@@ -91,17 +74,6 @@
     return os.path.join(getConfigDir(), filename)
 
 
-def setConfigDir(d):
-    """
-    Module function to set the name of the directory storing the config data.
-
-    @param d name of an existing directory
-    @type str
-    """
-    global configDir
-    configDir = os.path.expanduser(d)
-
-
 ###############################################################################
 ## functions for web browser variant detection
 ###############################################################################

eric ide

mercurial