Tag Archives: operating system

Generate safe filenames using Python

This function removes illegal  characters to create file names that are safe to use on most operating systems. import string ## Make a file name that only contains safe charaters # @param inputFilename A filename containing illegal characters # @return A filename containing only safe characters def makeSafeFilename(inputFilename):     try:      safechars = string.letters + […]

Python Also tagged Leave a comment