PK! nonrepeat.pyimport re import os def nonrepeat_filename(filename, primary_suffix=None, separator='-', start=0, root=''): while os.path.exists(os.path.join(root, filename)): stem, suffix = os.path.splitext(filename) if primary_suffix: if not re.search(r'.*{}({}\d+)?'.format(re.escape(primary_suffix), re.escape(separator)), stem): stem += separator + primary_suffix filename = stem + suffix continue match_obj = re.search(r'(.*)(?>> from nonrepeat import nonrepeat >>> nonrepeat('foo', pool=['foo', 'foo0', 'foo1']) 'foo2' """ pool = set(pool) while name in pool: if primary_suffix: if primary_suffix not in name: name += separator + primary_suffix continue match_obj = re.search(r'(.*)(?X4*yETi]ib5[q ΞyS#䃶 Q!lٓ#oy+'biFz N~@n!D *v)zJtC`}1+ѣtq€7rԃc<5b3`)]A)8vjvIa܍S*X.۸6PK!HԆ nonrepeat-0.1.2.dist-info/RECORD}Kr0нg 㐦.d̠M!UOǤ])n͵)}ӗ(oFd6˃jL7CI.U{h@h jN<|䟥T^\'a;619`1AD7^tmW'(9>d<:~ޱtEZW˓YͧXPK! nonrepeat.pyPK!HMWX;nonrepeat-0.1.2.dist-info/WHEELPK!H n@z_"nonrepeat-0.1.2.dist-info/METADATAPK!HԆ  nonrepeat-0.1.2.dist-info/RECORDPK%