# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import sys, os,signal,string,subprocess
+import sys, os,signal,subprocess
def getCurrentPort():
fic=os.environ['OMNIORB_CONFIG']
with open(fic,'r') as f:
line=f.readline()
- port=string.split(line,':')[-1][0:4]
+ port=line.split(':')[-1][0:4]
return port
command='ps -eo pid,command | grep "omniNames -start '+str(port)+'" | grep --invert-match grep'
output_com = subprocess.getoutput(command)
try:
- pid=string.split(output_com)[0]
+ pid=output_com.split()[0]
os.kill(int(pid),signal.SIGKILL)
except:
print("killNamingService failed.")
}
_locals=PyDict_New();
PyObject *tmp(PyList_New(0));
- _pickler=PyImport_ImportModuleLevel(const_cast<char *>("cPickle"),_globals,_locals,tmp,-1);
+ _pickler=PyImport_ImportModuleLevel(const_cast<char *>("pickle"),_globals,_locals,tmp,-1);
}
void DataScopeServerBase::registerToSalomePiDict() const