Salome HOME
PR: merge from branch BR_UnitTests tag mergeto_trunk_17oct05
[modules/kernel.git] / bin / killSalome.py
1 #!/usr/bin/env python
2 import os, string, sys
3
4 from killSalomeWithPort import killMyPort
5
6 def killAllPorts():
7     user = os.getenv('USER')
8     for file in os.listdir(os.getenv("HOME")):
9         l = string.split(file, "_")
10         if len(l) >= 4:
11             if file[:len(user)] == user:
12                 if l[len(l)-2] == "SALOME" and l[len(l)-1] == "pidict":
13                     killMyPort(l[len(l)-3])
14         pass
15
16 if __name__ == "__main__":
17     killAllPorts()