def getFilePathWithUnderscoredBasename(fileName, suffix):
 suffixFileName = (getUntilDot(fileName) + suffix)
 suffixDirectoryName = os.path.dirname(suffixFileName)
 suffixReplacedBaseName = os.path.basename(suffixFileName).replace(' ', '_')
 return os.path.join(suffixDirectoryName, suffixReplacedBaseName)

def getFilePathWithUnderscoredBasename ( fileName , suffix ) : suffixFileName = ( getUntilDot ( fileName ) + suffix ) suffixDirectoryName = os . path . dirname ( suffixFileName ) suffixReplacedBaseName = os . path . basename ( suffixFileName ) . replace ( ' ' , '_' ) return os . path . join ( suffixDirectoryName , suffixReplacedBaseName )
get the file path with all spaces in the basename replaced with underscores .