'Set environment variable with a cyclic pattern
Set "pattern" option for basic/extended pattern type
Usage:
MYNAME ENVNAME size[,offset]'

def pattern_env(self, *arg):

    (env, size) = normalize_argv(arg, 2)
    if (size is None):
        self._missing_argument()
    (size, offset) = (arg[1] + ',').split(',')[:2]
    size = to_int(size)
    if offset:
        offset = to_int(offset)
    else:
        offset = 0
    if ((size is None) or (offset is None)):
        self._missing_argument()
    peda.execute(('set    env    %s    %s' % (env, cyclic_pattern(size, offset).decode('utf-8'))))
    msg(('Set    environment    %s    =    cyclic_pattern(%d,    %d)' % (env, size, offset)))
    return
