Number of POSIX standard refer to the Portable Character Set.
I need to check that user input corresponds to the standards and consists only from the acceptable characters. Is there any convenient way to do the check?
There is tedious approach to manually port table from the wikipedia:
portable_set = '\0\a\b...'
def check(sample):
return all(c in portable_set for c in sample)
But POSIX is all round us, so I believe somewhere in the python standard library such set should be already defined. But I don't know the location to find it.