--- a/src/eric7/VirtualEnv/VirtualenvManager.py Mon Jun 03 19:43:09 2024 +0200 +++ b/src/eric7/VirtualEnv/VirtualenvManager.py Fri Jun 07 10:50:23 2024 +0200 @@ -609,15 +609,18 @@ else: return "" - def getVirtualenvNames(self, noRemote=False, noConda=False): + def getVirtualenvNames(self, noRemote=False, noConda=False, noGlobals=False): """ Public method to get a list of defined virtual environments. @param noRemote flag indicating to exclude environments for remote - debugging - @type bool - @param noConda flag indicating to exclude Conda environments - @type bool + debugging (defaults to False) + @type bool (optional) + @param noConda flag indicating to exclude Conda environments (defaults to False) + @type bool (optional) + @param noGlobals flag indicating to exclude global environments + (defaults to False) + @type bool (optional) @return list of defined virtual environments @rtype list of str """ @@ -630,6 +633,10 @@ environments = [ name for name in environments if not self.isCondaEnvironment(name) ] + if noGlobals: + environments = [ + name for name in environments if not self.isGlobalEnvironment(name) + ] return environments