12 2020 档案

摘要:来,开始从头创建一个仓库: 先创建一个文件夹 test_repo mkdir -p test_repo && cd test_repo 创建一个conf文件夹,此文件夹存放仓库的配置信息 mkdir -p conf && cd conf 开始写仓库配置信息 vim distributions 文件内 阅读全文
posted @ 2020-12-16 16:09 大长胡子 阅读(2205) 评论(0) 推荐(0)
摘要:路由 接下来给第一章的小例子增加一点东西: @app.route('/apple') def apple(): return 'This is appple' @app.route('/orange/') def orange(): return 'This is orange' 这样的形式,可以通 阅读全文
posted @ 2020-12-16 10:13 大长胡子 阅读(91) 评论(0) 推荐(0)
摘要:以下所有操作在linux系统python3 虚拟环境中使用 source your_env_path/bin/active 安装 pip install flask 第一个简单例子 创建hello.py 内容 from flask import Flask # 导入flask库文件 app = Fl 阅读全文
posted @ 2020-12-15 17:29 大长胡子 阅读(106) 评论(0) 推荐(0)
摘要:## 首先启动服务端 ### 服务端 """ 该脚本创建一个TCP服务器,接受客户端信息,返回加了时间缀的信息 """ from socket import * from time import ctime HOST = '' PORT = 21567 BUFSIZ = 1024 ADDR = (H 阅读全文
posted @ 2020-12-14 16:39 大长胡子 阅读(199) 评论(0) 推荐(0)