@clingon.clize(clear='<STR_LIT:C>', list_members=('<STR_LIT:l>', '<STR_LIT:m>'), time_show=('<STR_LIT:t>', '<STR_LIT:s>'))<EOL>def toto(arch_name, comment='<STR_LIT>', clear=False, read_comment=False, list_members=False, time_show=False):
if comment and clear:<EOL><INDENT>clingon.RunnerError("<STR_LIT>")<EOL><DEDENT>z = None<EOL>if not os.path.isfile(arch_name):<EOL><INDENT>print("<STR_LIT>", arch_name)<EOL>z = zipfile.ZipFile(arch_name, '<STR_LIT:w>')<EOL>for f in [x for x in glob.iglob('<STR_LIT>') if not x.endswith('<STR_LIT>')][:<NUM_LIT:3>]:<EOL><INDENT>print("<STR_LIT>" % (f, arch_name))<EOL>z.write(f)<EOL><DEDENT><DEDENT>if comment:<EOL><INDENT>mtime = os.path.getmtime(arch_name)<EOL>if not z:<EOL><INDENT>z = zipfile.ZipFile(arch_name, '<STR_LIT:a>')<EOL><DEDENT>z.comment = comment<EOL><DEDENT>if z:<EOL><INDENT>z.close()<EOL>if comment:<EOL><INDENT>os.utime(arch_name, (time.time(), mtime))<EOL><DEDENT><DEDENT>if read_comment:<EOL><INDENT>z = zipfile.ZipFile(arch_name, '<STR_LIT:r>')<EOL>print("<STR_LIT>", z.comment, len(z.comment))<EOL><DEDENT>if list_members:<EOL><INDENT>z = zipfile.ZipFile(arch_name, '<STR_LIT:r>')<EOL>print("<STR_LIT>", z.namelist())<EOL><DEDENT>if time_show:<EOL><INDENT>print("<STR_LIT>", time.ctime(os.path.getatime(arch_name)))<EOL>print("<STR_LIT>", time.ctime(os.path.getmtime(arch_name)))<EOL><DEDENT>
Small utility for changing comment in a zip file
        without changing the file modification datetime.