From 055033b225dfff8aa9bc3db55138fa43d604f0f8 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:51:20 +0800 Subject: [PATCH 1/9] =?UTF-8?q?add=20=E7=AC=AC=E4=BA=8C=E6=9C=9F=E8=AE=AD?= =?UTF-8?q?=E7=BB=83=E8=90=A5/4=E7=8F=AD/4=E7=8F=AD=5F=E6=97=A0=E5=BD=A2?= =?UTF-8?q?=E4=B9=8B=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD?= =?UTF-8?q?/=E7=AC=AC=E5=8D=81=E5=91=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\200\350\212\202" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202" new file mode 100644 index 00000000..e69de29b -- Gitee From 589946a73f0f3ae5429bc9defadbdf88cdac5db8 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:51:33 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=9C=9F=E8=AE=AD=E7=BB=83=E8=90=A5/4?= =?UTF-8?q?=E7=8F=AD/4=E7=8F=AD=5F=E6=97=A0=E5=BD=A2=E4=B9=8B=E5=88=83?= =?UTF-8?q?=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD/=E7=AC=AC?= =?UTF-8?q?=E5=8D=81=E5=91=A8/=E7=AC=AC=E4=B8=80=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\200\350\212\202" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202" deleted file mode 100644 index e69de29b..00000000 -- Gitee From e90a49d11a5c1e0809fd9b5ba9427d64e13710f4 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:51:42 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\200\350\212\202/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/.keep" new file mode 100644 index 00000000..e69de29b -- Gitee From 2de4fd47c77282bdac6f5cc1bce16e315c6d7d0e Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:51:57 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20new?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\200\350\212\202/new/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/.keep" new file mode 100644 index 00000000..e69de29b -- Gitee From 09839c24e8eae985536a6838635fc22755686e70 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:52:16 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\200\350\212\202/new/test/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/.keep" new file mode 100644 index 00000000..e69de29b -- Gitee From a55f7789d79d6e99398b2b43e2505133417f89a1 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:52:23 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20parse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\347\254\254\344\270\200\350\212\202/new/parse/.keep" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/.keep" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/.keep" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/.keep" new file mode 100644 index 00000000..e69de29b -- Gitee From 8cde6975aef830d4f2143b1178d7373b3b7ace96 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:53:17 +0800 Subject: [PATCH 7/9] =?UTF-8?q?4=E7=8F=AD=5F=E6=97=A0=E5=BD=A2=E4=B9=8B?= =?UTF-8?q?=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD-?= =?UTF-8?q?=E7=AC=AC=E5=8D=81=E5=91=A8-=E7=AC=AC=E4=B8=80=E8=8A=82?= =?UTF-8?q?=E8=AF=BE=E4=BD=9C=E4=B8=9A=204=E7=8F=AD=5F=E6=97=A0=E5=BD=A2?= =?UTF-8?q?=E4=B9=8B=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD?= =?UTF-8?q?-=E7=AC=AC=E5=8D=81=E5=91=A8-=E7=AC=AC=E4=B8=80=E8=8A=82?= =?UTF-8?q?=E8=AF=BE=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../new/parse/parse_search.py" | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/parse_search.py" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/parse_search.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/parse_search.py" new file mode 100644 index 00000000..5e31a967 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/parse/parse_search.py" @@ -0,0 +1,8 @@ + + + +def parse_search_a(): + return r"我是 Y:\pycharmprojects\new\parse\parse_search.py 下的parse_search_a函数" + +if __name__ == '__main__': + print(parse_search_a()) \ No newline at end of file -- Gitee From 6a12a29665a3cbf289080b78f6d5c291c4821521 Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:53:35 +0800 Subject: [PATCH 8/9] =?UTF-8?q?4=E7=8F=AD=5F=E6=97=A0=E5=BD=A2=E4=B9=8B?= =?UTF-8?q?=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD-?= =?UTF-8?q?=E7=AC=AC=E5=8D=81=E5=91=A8-=E7=AC=AC=E4=B8=80=E8=8A=82?= =?UTF-8?q?=E8=AF=BE=E4=BD=9C=E4=B8=9A=204=E7=8F=AD=5F=E6=97=A0=E5=BD=A2?= =?UTF-8?q?=E4=B9=8B=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD?= =?UTF-8?q?-=E7=AC=AC=E5=8D=81=E5=91=A8-=E7=AC=AC=E4=B8=80=E8=8A=82?= =?UTF-8?q?=E8=AF=BE=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../new/test/parser_test.py" | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/parser_test.py" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/parser_test.py" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/parser_test.py" new file mode 100644 index 00000000..9404f1b3 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/new/test/parser_test.py" @@ -0,0 +1,17 @@ + +import os +import sys + +#不将工作目录添加到路径列表,pycharm下从parse_search导入parse_search_a不报错,但终端运行会报错 +sys.path.append(os.getcwd()) +from new.parse.parse_search import parse_search_a + +#入口程序不能使用相对路径,否则会报错attempted relative import beyond top-level package +#from ..parse.parse_search import parse_search_a + +#包名不能和系统内置包名冲突,否则会报错No module named 'parser.search'; 'parser' is not a pac kage + + + +if __name__ == '__main__': + print(parse_search_a()) \ No newline at end of file -- Gitee From 885545ce870cc789a0c8416b77820b79b898042d Mon Sep 17 00:00:00 2001 From: 07150943 <1255125169@qq.com> Date: Thu, 4 Mar 2021 21:58:40 +0800 Subject: [PATCH 9/9] =?UTF-8?q?4=E7=8F=AD=5F=E6=97=A0=E5=BD=A2=E4=B9=8B?= =?UTF-8?q?=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD-?= =?UTF-8?q?=E7=AC=AC=E5=8D=81=E5=91=A8-=E7=AC=AC=E4=B8=80=E8=8A=82?= =?UTF-8?q?=E8=AF=BE=E4=BD=9C=E4=B8=9A=204=E7=8F=AD=5F=E6=97=A0=E5=BD=A2?= =?UTF-8?q?=E4=B9=8B=E5=88=83=E4=B8=B6=E6=9C=80=E4=B8=BA=E8=87=B4=E5=91=BD?= =?UTF-8?q?-=E7=AC=AC=E5=8D=81=E5=91=A8-=E7=AC=AC=E4=B8=80=E8=8A=82?= =?UTF-8?q?=E8=AF=BE=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...350\212\202-python\350\267\257\345\276\204.md" | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 "\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/\347\254\254\345\215\201\345\221\250-\347\254\254\344\270\200\350\212\202-python\350\267\257\345\276\204.md" diff --git "a/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/\347\254\254\345\215\201\345\221\250-\347\254\254\344\270\200\350\212\202-python\350\267\257\345\276\204.md" "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/\347\254\254\345\215\201\345\221\250-\347\254\254\344\270\200\350\212\202-python\350\267\257\345\276\204.md" new file mode 100644 index 00000000..db797eb9 --- /dev/null +++ "b/\347\254\254\344\272\214\346\234\237\350\256\255\347\273\203\350\220\245/4\347\217\255/4\347\217\255_\346\227\240\345\275\242\344\271\213\345\210\203\344\270\266\346\234\200\344\270\272\350\207\264\345\221\275/\347\254\254\345\215\201\345\221\250/\347\254\254\344\270\200\350\212\202/\347\254\254\345\215\201\345\221\250-\347\254\254\344\270\200\350\212\202-python\350\267\257\345\276\204.md" @@ -0,0 +1,15 @@ +课后作业 + +1:命令行运行程序 + +​ 没有把工作目录添加到路径列表会报错 + +![命令行运行失败](https://s3.ax1x.com/2021/03/04/6Z8sMD.png) + +​ 把工作目录添加到路径列表后正常 + +![命令行运成功](https://s3.ax1x.com/2021/03/04/6ZGh79.png) + + + +2:在`/test`目录中增加`parser_test.py`模块做解析测试 \ No newline at end of file -- Gitee