Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN 技术社区
skill_tree_python
提交
cf392820
S
skill_tree_python
项目概览
CSDN 技术社区
/
skill_tree_python
通知
66
Star
14
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skill_tree_python
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
cf392820
编写于
12月 22, 2021
作者:
F
feilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化Python第3章代码+fix1
上级
783fa0fb
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
22 addition
and
17 deletion
+22
-17
data/1.python初阶/3.进阶语法/10.字符编码与解码/encode.json
data/1.python初阶/3.进阶语法/10.字符编码与解码/encode.json
+1
-1
data/1.python初阶/3.进阶语法/2.三元表达式/triple01.json
data/1.python初阶/3.进阶语法/2.三元表达式/triple01.json
+1
-1
data/1.python初阶/3.进阶语法/2.三元表达式/triple02.json
data/1.python初阶/3.进阶语法/2.三元表达式/triple02.json
+1
-1
data/1.python初阶/3.进阶语法/3.断言/assert.json
data/1.python初阶/3.进阶语法/3.断言/assert.json
+1
-1
data/1.python初阶/3.进阶语法/4.with-as/enter_exit.json
data/1.python初阶/3.进阶语法/4.with-as/enter_exit.json
+1
-1
data/1.python初阶/3.进阶语法/4.with-as/withas.json
data/1.python初阶/3.进阶语法/4.with-as/withas.json
+1
-1
data/1.python初阶/3.进阶语法/5.异常捕获预处理/try01.json
data/1.python初阶/3.进阶语法/5.异常捕获预处理/try01.json
+1
-1
data/1.python初阶/3.进阶语法/6.字符串方法/str.json
data/1.python初阶/3.进阶语法/6.字符串方法/str.json
+1
-1
data/1.python初阶/3.进阶语法/7.lambda函数/lambda.json
data/1.python初阶/3.进阶语法/7.lambda函数/lambda.json
+1
-1
data/1.python初阶/3.进阶语法/8.文件/file_basic.json
data/1.python初阶/3.进阶语法/8.文件/file_basic.json
+1
-1
data/1.python初阶/3.进阶语法/8.文件/file_piece_sha256.json
data/1.python初阶/3.进阶语法/8.文件/file_piece_sha256.json
+1
-1
data/1.python初阶/3.进阶语法/9.常用标准库/std01.json
data/1.python初阶/3.进阶语法/9.常用标准库/std01.json
+1
-1
data/1.python初阶/3.进阶语法/9.常用标准库/std02.json
data/1.python初阶/3.进阶语法/9.常用标准库/std02.json
+1
-1
main.py
main.py
+4
-4
src/md.py
src/md.py
+5
-0
未找到文件。
data/1.python初阶/3.进阶语法/10.字符编码与解码/encode.json
浏览文件 @
cf392820
{
"source"
:
"encode.
py
"
,
"source"
:
"encode.
md
"
,
"depends"
:
[],
"exercise_id"
:
107
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/2.三元表达式/triple01.json
浏览文件 @
cf392820
{
"source"
:
"triple01.
py
"
,
"source"
:
"triple01.
md
"
,
"depends"
:
[],
"exercise_id"
:
215
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/2.三元表达式/triple02.json
浏览文件 @
cf392820
{
"source"
:
"triple02.
py
"
,
"source"
:
"triple02.
md
"
,
"depends"
:
[],
"exercise_id"
:
203
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/3.断言/assert.json
浏览文件 @
cf392820
{
"source"
:
"assert.
py
"
,
"source"
:
"assert.
md
"
,
"depends"
:
[],
"exercise_id"
:
110
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/4.with-as/enter_exit.json
浏览文件 @
cf392820
{
"source"
:
"enter_exit.
py
"
,
"source"
:
"enter_exit.
md
"
,
"depends"
:
[],
"exercise_id"
:
178
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/4.with-as/withas.json
浏览文件 @
cf392820
{
"source"
:
"withas.
py
"
,
"source"
:
"withas.
md
"
,
"depends"
:
[],
"exercise_id"
:
118
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/5.异常捕获预处理/try01.json
浏览文件 @
cf392820
{
"source"
:
"try01.
py
"
,
"source"
:
"try01.
md
"
,
"depends"
:
[],
"exercise_id"
:
237
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/6.字符串方法/str.json
浏览文件 @
cf392820
{
"source"
:
"str.
py
"
,
"source"
:
"str.
md
"
,
"depends"
:
[],
"exercise_id"
:
112
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/7.lambda函数/lambda.json
浏览文件 @
cf392820
{
"source"
:
"lambda.
py
"
,
"source"
:
"lambda.
md
"
,
"depends"
:
[],
"exercise_id"
:
108
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/8.文件/file_basic.json
浏览文件 @
cf392820
{
"source"
:
"file_basic.
py
"
,
"source"
:
"file_basic.
md
"
,
"depends"
:
[],
"exercise_id"
:
199
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/8.文件/file_piece_sha256.json
浏览文件 @
cf392820
{
"source"
:
"file_piece_sha256.
py
"
,
"source"
:
"file_piece_sha256.
md
"
,
"depends"
:
[],
"exercise_id"
:
213
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/9.常用标准库/std01.json
浏览文件 @
cf392820
{
"source"
:
"std01.
py
"
,
"source"
:
"std01.
md
"
,
"depends"
:
[],
"exercise_id"
:
222
,
"type"
:
"code_options"
,
...
...
data/1.python初阶/3.进阶语法/9.常用标准库/std02.json
浏览文件 @
cf392820
{
"source"
:
"std02.
py
"
,
"source"
:
"std02.
md
"
,
"depends"
:
[],
"exercise_id"
:
196
,
"type"
:
"code_options"
,
...
...
main.py
浏览文件 @
cf392820
...
...
@@ -6,8 +6,8 @@ import os
import
re
if
__name__
==
'__main__'
:
walker
=
TreeWalker
(
"data"
,
"python"
,
"python"
)
walker
.
walk
()
#
walker = TreeWalker("data", "python", "python")
#
walker.walk()
#
md = MDWalker('data/1.python初阶/3.进阶语法')
#
md.walk()
md
=
MDWalker
(
'data/1.python初阶/3.进阶语法'
)
md
.
walk
()
src/md.py
浏览文件 @
cf392820
...
...
@@ -91,7 +91,11 @@ class MDWalker():
print
(
json_file
)
if
os
.
path
.
exists
(
md_file
):
j
=
load_json
(
json_file
)
j
[
'source'
]
=
j
[
'source'
].
replace
(
'.py'
,
'.md'
)
dump_json
(
json_file
,
j
,
True
,
True
)
continue
md
=
[]
self
.
emit_head
(
md
,
py
)
self
.
emit_template
(
md
,
py
)
...
...
@@ -107,6 +111,7 @@ class MDWalker():
del
j
[
'multiline'
]
j
[
'author'
]
=
py
[
'author'
]
j
[
'notebook_enable'
]
=
True
j
[
'source'
]
=
j
[
'source'
].
replace
(
'.py'
,
'.md'
)
dump_json
(
json_file
,
j
,
True
,
True
)
def
emit_head
(
self
,
md
,
py
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录