def running_modules(regex='*'):
	mods = []
	for pidfile in glob.iglob(regex % 'tmp/pids/%s.pid'):
		module = osp.splitext(osp.basename(pidfile))[0]
		pid = open(pidfile).read()
		mods.append((module, pid, pidfile))
	return mods


# == Module Management ==
dataset/ETHPy150Open alexcepoi/pyscale/pyscale/tools/tasks.py/running_modules/swapped operands of `%`