Salome HOME
Change configuration
[modules/kernel.git] / bin / killSalome.py
1 #!/usr/bin/env python
2 import os, string, sys, re
3
4 from killSalomeWithPort import killMyPort, getPiDict
5
6 def killAllPorts():
7     user = os.getenv('USER')
8     filedict = "^%s$"%(getPiDict('(\d*)',full=False))
9     fnamere = re.compile(filedict)
10     for file in os.listdir(os.getenv("HOME")):
11         mo = re.match(fnamere,file)
12         if mo and len(mo.groups()):
13             killMyPort(mo.groups()[0])
14         pass
15
16 if __name__ == "__main__":
17     killAllPorts()