{"id":95986,"date":"2020-04-08T05:12:13","date_gmt":"2020-04-07T21:12:13","guid":{"rendered":"http:\/\/4563.org\/?p=95986"},"modified":"2020-04-08T05:12:13","modified_gmt":"2020-04-07T21:12:13","slug":"python-module-%e7%96%91%e9%97%ae","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=95986","title":{"rendered":"Python module \u7591\u95ee"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python module \u7591\u95ee               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fangwenxue <\/span>  <span><i><\/i> 57<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200520_5ec4f3f61f175.jpg\" alt=\"Python module \u7591\u95ee\" \/> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200520_5ec4f3f64f069.jpg\" alt=\"Python module \u7591\u95ee\" \/><\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"845554\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Senventise <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u53bb\u8bd5\u4e86\u4e0b\uff0c\u56fe 2 \u7684 import \u5e94\u8be5\u6ca1\u95ee\u9898\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"845555\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BingoXuan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1.you_get \u624d\u662f\u771f\u6b63\u7684\u5305\uff0c\u6709__init__.py<br \/>2.\u6211\u6000\u7591\u662f\u8fd0\u884c\u65f6\u68c0\u7d22\u5305\u76ee\u5f55\u4e0d\u4e00\u6837\u6216\u8005 pycharm \u8bbe\u7f6e\u95ee\u9898\u3002pycharm \u76f4\u63a5\u628a\u4f60 src \u5f53\u4f5c\u5305\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"845556\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : fangwenxue <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Senventise <br \/>@BingoXuan <\/p>\n<p>\u6211\u5728 pycharm \u5427 src \u8bbe\u7f6e\u4e86\u4e0b\uff0c\u5c31\u53ef\u4ee5\u5bfc\u5165\u4e86                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"845557\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : classyk <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7b2c\u4e00\u4e2a\u91cc\u9762\u8bbe\u7f6e\u4e86 os.path                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"845558\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : n121 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             import xxx \u5c31\u662f\u6cbf\u7740 sys.path \u4f9d\u6b21\u627e xxx.py \u6216\u8005 xxx\/__init__.py \u6587\u4ef6\uff08\u8fd8\u6709 zip \u5bfc\u5165\u3001import hooks \u4e4b\u7c7b\uff09<\/p>\n<p>\u7b2c\u4e00\u5f20\u56fe\u524d\u9762\u51e0\u884c\uff0c\u5c31\u662f\u628a src \u76ee\u5f55\u52a0\u5165\u5230 sys.path\uff0c\u6240\u4ee5 import you_get \u6ca1\u95ee\u9898\uff0c\u628a\u524d\u9762\u90a3\u51e0\u884c\u590d\u5236\u5230\u7b2c\u4e8c\u4e2a\u6587\u4ef6\u91cc\u4e5f\u884c<\/p>\n<p>PyCharm \u91cc\u8fd0\u884c\uff0c\u4f1a\u628a\u4f60\u6807\u8bb0\u4e3a Sources \u76ee\u5f55\u52a0\u5165\u5230 sys.path \u4e2d\uff0c\u4e0d\u8fc7\u8981\u5728\u7ec8\u7aef\u91cc\u4f7f\u7528\uff0c\u8fd8\u662f\u9700\u8981\u81ea\u5df1\u52a0 sys.path                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python module \u7591\u95ee &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/95986"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95986"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/95986\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95986"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95986"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95986"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}