(function from pyomo.common.fileutils)
pyomo.common.fileutils
Convert a string to a legal filename on the current platform.
This converts a candidate file name (not a path) and converts it to a legal file name on the current platform. This includes replacing any unallowable characters (including the path separator) with underscores (_), and on some platforms, enforcing restrictions on the allowable final character.
_
name (str) – The original (desired) file name
universal (bool) – If True, this will attempt a form of “universal” standardization that uses the most restrictive set of character translations and rules. Currently, universal=True is equivalent to running the Windows translations.
universal=True