try:
    import argparse
    # Workaround an argparse bug, FIXED in argparse 1.1.0
    if 'RawTextHelpFormatterArgumentDefaultsHelpFormatter' in argparse.__all__:
        import itertools
        argparse.__all__ = list(itertools.chain( [i for i in argparse.__all__
            if i != 'RawTextHelpFormatterArgumentDefaultsHelpFormatter'],
            ['RawTextHelpFormatter', 'ArgumentDefaultsHelpFormatter']))
    argparse.__all__.append('SUPPRESS')
    from argparse import *
except ImportError:
    from _argparse import *
    from _argparse import SUPPRESS

try:
    import argparse
    # don't use system argparse if older than 1.1:
    if argparse.__version__ < '1.1':
        raise ImportError
    else:
        from argparse import *
        from argparse import SUPPRESS
except (ImportError, AttributeError):
    from _argparse import *
    from _argparse import SUPPRESS

use bundled argparse if system argparse is < 1.1