+ os.remove(filedict)
+ pass
+#
+
+def __guessPiDictFilename(port):
+ from salome_utils import getShortHostName, getHostName
+ filedicts = [
+ # new-style dot-prefixed pidict file
+ getPiDict(port, hidden=True),
+ # provide compatibility with old-style pidict file (not dot-prefixed)
+ getPiDict(port, hidden=False),
+ # provide compatibility with old-style pidict file (short hostname)
+ getPiDict(port, hidden=True, hostname=getShortHostName()),
+ # provide compatibility with old-style pidict file (not dot-prefixed, short hostname
+ getPiDict(port, hidden=False, hostname=getShortHostName()),
+ # provide compatibility with old-style pidict file (long hostname)
+ getPiDict(port, hidden=True, hostname=getHostName()),
+ # provide compatibility with old-style pidict file (not dot-prefixed, long hostname)
+ getPiDict(port, hidden=False, hostname=getHostName())
+ ]
+
+ log_msg = ""
+ for filedict in filedicts:
+ log_msg += "Trying %s..."%filedict
+ if os.path.exists(filedict):
+ log_msg += " ... OK\n"
+ break
+ else:
+ log_msg += " ... not found\n"
+
+ if verbose():
+ print(log_msg)
+
+ return filedict