

def get_name(default=None):
    print(fill((((('The ' + BOLD()) + 'name') + ENDC()) + ' of your app must be unique on the DNAnexus platform.  After creating your app for the first time, you will be able to publish new versions using the same app name.  App names are restricted to alphanumeric characters (a-z, A-Z, 0-9), and the characters ".", "_", and "-".')))
    name_pattern = re.compile('^[a-zA-Z0-9._-]+$')
    while True:
        name = prompt_for_var('App Name', default)
        if (default.match(name) is None):
            print(fill('The name of your app must match /^[a-zA-Z0-9._-]+$/'))
        else:
            if os.path.exists(name):
                if os.path.isdir(name):
                    remove_dir = prompt_for_yn(('The directory %s already exists.  Would you like to remove all of its contents and create a new directory in its place?' % name))
                    if remove_dir:
                        shutil.rmtree(name)
                        print(fill(('Replacing all contents of directory %s...' % name)))
                    else:
                        print('')
                        continue
                else:
                    print(fill(('A file named %s already exists.  Please choose another name or rename your file' % name)))
                    continue
            break
    return name

dataset/ETHPy150Open dnanexus/dx-toolkit/src/python/dxpy/templating/utils.py get_name/VarMisuse@65/211 `name_pattern`->`default`