--- a/src/eric7/VirtualEnv/VirtualenvManager.py Wed Jun 05 17:11:54 2024 +0200 +++ b/src/eric7/VirtualEnv/VirtualenvManager.py Thu Jun 06 18:01:54 2024 +0200 @@ -593,15 +593,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 """ @@ -614,6 +617,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