def init(name, subnames, dest, skeleton, description, project_type, skip_core):
    """Creates a standalone, subprojects or submodules script sctrucure"""
    dest = dest or CUR_DIR
    skeleton = join(skeleton or SKEL_PATH, project_type)
    project = join(dest, name)
    script = join(project, name + '.py')
    core = join(project, name)
    if project_type == 'standalone':
        renames = [
            (join(project, 'project.py'), script),
            (join(project, 'project'), core)]
        copy_skeleton(
            name, skeleton, project, renames=renames, description=description,
            ignore=False)
    else:
        renames = [
            (join(project, 'project.py'), script),
            (join(project, 'project'), core)]
        exclude_dirs = ['submodule'] + (['project'] if skip_core else [])
        copy_skeleton(
            name, skeleton, project, renames=renames, description=description,
            exclude_dirs=exclude_dirs, ignore=True)
        for subname in subnames:
            renames = [
                (join(project, 'submodule'), join(project, subname))
            ]
            copy_skeleton(
                subname, skeleton, project, renames=renames,
                description=description, ignore=True,
                exclude_dirs=['project'], exclude_files=['project.py'])
    return 0, "\n{}\n".format(project)
def init ( name , subnames , dest , skeleton , description , project_type , skip_core ) : dest = dest or CUR_DIR skeleton = join ( skeleton or SKEL_PATH , project_type ) project = join ( dest , name ) script = join ( project , name + '.py' ) core = join ( project , name ) if project_type == 'standalone' : renames = [ ( join ( project , 'project.py' ) , script ) , ( join ( project , 'project' ) , core ) ] copy_skeleton ( name , skeleton , project , renames = renames , description = description , ignore = False ) else : renames = [ ( join ( project , 'project.py' ) , script ) , ( join ( project , 'project' ) , core ) ] exclude_dirs = [ 'submodule' ] + ( [ 'project' ] if skip_core else [ ] ) copy_skeleton ( name , skeleton , project , renames = renames , description = description , exclude_dirs = exclude_dirs , ignore = True ) for subname in subnames : renames = [ ( join ( project , 'submodule' ) , join ( project , subname ) ) ] copy_skeleton ( subname , skeleton , project , renames = renames , description = description , ignore = True , exclude_dirs = [ 'project' ] , exclude_files = [ 'project.py' ] ) return 0 , "\n{}\n" . format ( project )
Creates a standalone, subprojects or submodules script sctrucure