def _re_pattern_pprint(obj, p, cycle):
    p.text('re.compile(')
    pattern = repr(obj.pattern)
    if pattern[:1] in 'uU':
        pattern = pattern[1:]
        prefix = 'ur'
    else:
        prefix = 'r'
    pattern = prefix + pattern.replace('\\\\', '\\')
    p.text(pattern)
    if obj.flags:
        p.text(',')
        p.breakable()
        done_one = False
        for flag in ('TEMPLATE', 'IGNORECASE', 'LOCALE', 'MULTILINE', 'DOTALL',
            'UNICODE', 'VERBOSE', 'DEBUG'):
            if obj.flags & getattr(re, flag):
                if done_one:
                    p.text('|')
                p.text('re.' + flag)
                done_one = True
    p.text(')')
Return a domain object for the named VM or return domain object for all VMs.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/lib/pretty.py/_re_pattern_pprint--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/_get_domain