'Generate a cyclic pattern
Set "pattern" option for basic/extended pattern type
Usage:
MYNAME size [file]'

def pattern_create(self, *arg):

    (size, filename) = normalize_argv(arg, 2)
    if (size is None):
        self._missing_argument()
    pattern = cyclic_pattern(size)
    if (filename is not None):
        open(filename, 'wb').write(pattern)
        msg(('Writing    pattern    of    %d    chars    to    filename    "%s"' % (len(pattern), filename)))
    else:
        msg((("'" + pattern.decode('utf-8')) + "'"))
    return
