zoukankan      html  css  js  c++  java
  • 自动化创建项目标准脚本

    #导入模块:
    import os

    #分别创建文件夹:
    os.makedirs("Course_selection/bin")
    os.makedirs("Course_selection/core")
    os.makedirs("Course_selection/conf")
    os.makedirs("Course_selection/db")
    os.makedirs("Course_selection/lib")
    os.makedirs("Course_selection/log")

    #展示目录信息:
    course_selection_list = os.listdir("Course_selection")
    print("您创建的项目目录有:",course_selection_list) #展示创建的目录信息

    #文件里面写入信息:
    with open("Course_selection/bin/start.py","w",encoding="utf-8") as f,
    open("Course_selection/core/admin_service.py","w",encoding="utf-8") as f1,
    open("Course_selection/conf/settings.py","w",encoding="utf-8") as f2,
    open("Course_selection/lib/commom.py","w",encoding="utf-8") as f3,
    open("Course_selection/README.md","w",encoding="utf-8") as f4:
    f4.write("------------------ "
    "## 本程序实现的内容如下: "
    "### 1. "
    "### 2. "
    "### 3. "
    "### 4. "
    "### 5. "
    "### 6. "
    "### 7. 退出程序 "

    "--------------- "
    "## 本程序运行环境: "
    "### 1.Python3.6.8 解释器 "

    "---------------- "
    "## 系统环境: "
    "#### Windows "

    "----------------- "
    "## 开发信息: "
    "### 作者: Zhangda "
    "### 时间: 2019年11月13日15:11:08 "
    "### 数据来源 : "

    "------------- ")
  • 相关阅读:
    url-pattern / /*匹配
    velocity入门
    配置eclipse插件
    Myeclipse 2014 破解
    Eclipse kepler 安装 Dynamic Web Project差距WTP
    Errors running builder 'Faceted Project Validation Builder' on project
    JSF web.xml的各类参数属性配置
    bpm 学习笔记一
    love is ... ...
    .sh_history文件的管理机制
  • 原文地址:https://www.cnblogs.com/zhang-da/p/11870523.html
Copyright © 2011-2022 走看看