eric6/Globals/__init__.py

changeset 7804
1cbc27e34ec6
parent 7780
41420f82c0ac
child 7805
3cad282e8409
--- a/eric6/Globals/__init__.py	Sun Oct 18 12:42:37 2020 +0200
+++ b/eric6/Globals/__init__.py	Sun Oct 18 18:51:45 2020 +0200
@@ -20,6 +20,8 @@
     QDir, QByteArray, QCoreApplication, QT_VERSION, QProcess, qVersion
 )
 
+from eric6config import getConfig
+
 # names of the various settings objects
 settingsNameOrganization = "Eric6"
 settingsNameGlobal = "eric6"
@@ -213,6 +215,23 @@
     return hp
 
 
+def getInstallInfoFilePath():
+    """
+    Public method to get the path name of the install info file.
+    
+    @return file path of the install info file
+    @rtype str
+    """
+    filename = "eric6install.{0}.json".format(
+        getConfig("ericDir")
+        .replace("\\", "_")
+        .replace("/", "_")
+        .replace(" ", "_")
+        .strip("_")
+    )
+    return os.path.join(getConfigDir(), filename)
+
+
 def setConfigDir(d):
     """
     Module function to set the name of the directory storing the config data.

eric ide

mercurial