

def create_project(project_name, template='default'):
    '\n    Create the project\n    '
    project_dir = get_project_dir_path(project_name)
    run_file = ('%s/run_%s.py' % (CWD, project_name))
    run_tpl = pkg_resources.resource_string(__name__, ('%s/run_%s.py.tpl' % (PROJECTS_TEMPLATES, template)))
    if (not os.path.isdir(project_dir)):
        os.makedirs(project_dir)
    else:
        raise OSError(("Project dir '%s' exists already " % project_name))
    if (not os.path.isfile(run_file)):
        with open(run_file, 'wb') as f:
            f.write(run_tpl.format(project_name=project_name))
    copy_resource(('%s/%s/' % (PROJECTS_TEMPLATES, template)), project_dir)

dataset/ETHPy150Open mardix/flask-marcopolo/flask_marcopolo/cmd.py create_project/original