class StringFormattingParser(object):
    __matcher = re.compile(
        '(?<!%)%\\(([^)]+)\\)[-# +0-9.hlL]*[diouxXeEfFgGcrs]')

@classmethod
def getKeyNames(klass, formatString):
    pass
How to get the names of the named variables from the python string