def new_filename(fname=None, ndigits=3):
    if fname is None:
        ext = ("%%.%ii" % ndigits) % 1
        fname = "%s.%s" % (random_string(6), ext)

    if os.path.exists(fname):
        fname = increment_filename(fname, ndigits=ndigits)

    return fname
No-op that returns a clone of self
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/fileutils.py/new_filename--crossover with--dataset/ETHPy150Open mozilla/elasticutils/elasticutils/__init__.py/S.all