def filePathToSafeString(filePath):
 retVal = filePath.replace('/', '_').replace('\\', '_')
 retVal = retVal.replace(' ', '_').replace(':', '_')
 return retVal

def filePathToSafeString ( filePath ) : retVal = filePath . replace ( '/' , '_' ) . replace ( '\\' , '_' ) retVal = retVal . replace ( ' ' , '_' ) . replace ( ':' , '_' ) return retVal
returns string representation of a given filepath safe for a single filename usage .