File tree Expand file tree Collapse file tree 4 files changed +82
-0
lines changed
Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ // 使用 IntelliSense 了解相关属性。
3+ // 悬停以查看现有属性的描述。
4+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+ "version" : " 0.2.0" ,
6+ "configurations" : [
7+ {
8+ "name" : " Python: 当前文件" ,
9+ "type" : " python" ,
10+ "request" : " launch" ,
11+ "program" : " ${file}" ,
12+ "console" : " integratedTerminal"
13+ }
14+ ]
15+ }
Original file line number Diff line number Diff line change 1+ # 常用命令
2+
3+ - [ 一. pip] ( #一-pip )
4+ - [ 1.1. pip --editable] ( #11-pip---editable )
5+ - [ 1.2. pip list] ( #12-pip-list )
6+ - [ 二. flake8] ( #二-flake8 )
7+
8+ ## 一. pip
9+
10+ ### 1.1. pip --editable
11+
12+ ``` bash
13+ pip2 install -e .
14+ pip3 install -e .
15+ ```
16+
17+ ### 1.2. pip list
18+
19+ ``` bash
20+ pip2 list > ./Temp/txt/pip2_list.txt
21+ pip3 list > ./Temp/txt/pip3_list.txt
22+
23+ pip2 freeze > ./Temp/txt/pip2_freeze.txt
24+ pip3 freeze > ./Temp/txt/pip3_freeze.txt
25+ ```
26+
27+ ## 二. flake8
28+
29+ ``` bash
30+
31+ flake8 ./src/ > ./Temp/flake8_recorder.txt
32+ flake8 --exclude [* .pyc] ./src/
33+ flake8 --exclude [* .pyc] ./src/ > ./Temp/flake8_recorder.txt
34+ flake8 --help > ./Temp/flake8_help.txt
35+
36+ ```
Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation. All rights reserved.
2+ # Licensed under the MIT License.
3+
4+ import json
5+ import os
6+ import sys
7+
8+ obj = {}
9+ obj ["versionInfo" ] = tuple (sys .version_info )
10+ obj ["sysPrefix" ] = sys .prefix
11+ obj ["sysVersion" ] = sys .version
12+ obj ["is64Bit" ] = sys .maxsize > 2 ** 32
13+ obj ["PWD" ] = os .environ .get ('PWD' )
14+ obj ["VIRTUAL_ENV" ] = os .environ .get ('VIRTUAL_ENV' )
15+
16+ values = json .dumps (obj )
17+ # print(values)
18+ print ('ref: ./Temp/debug/env/interpreterInfo.json' )
19+ with open ('./Temp/debug/env/interpreterInfo.json' , 'w' ) as file :
20+ file .write (values )
Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation. All rights reserved.
2+ # Licensed under the MIT License.
3+
4+ import os
5+ import json
6+
7+ values = json .dumps (dict (os .environ ))
8+ # print(values)
9+ print ('ref: ./Temp/debug/env/printEnvVariables.json' )
10+ with open ('./Temp/debug/env/printEnvVariables.json' , 'w' ) as file :
11+ file .write (values )
You can’t perform that action at this time.
0 commit comments