{"id":98534,"date":"2020-03-28T21:34:21","date_gmt":"2020-03-28T13:34:21","guid":{"rendered":"http:\/\/4563.org\/?p=98534"},"modified":"2020-03-28T21:34:21","modified_gmt":"2020-03-28T13:34:21","slug":"python-%e7%9a%84%e4%b8%80%e4%b8%aa%e5%91%bd%e5%90%8d%e4%b9%a0%e6%83%af%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=98534","title":{"rendered":"Python \u7684\u4e00\u4e2a\u547d\u540d\u4e60\u60ef\u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Python \u7684\u4e00\u4e2a\u547d\u540d\u4e60\u60ef\u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <span><i><\/i> 51<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<ul>\n<li>\n<p>\u521a\u597d\u5728\u7528 pyaudio\uff0c\u770b\u5230\u8fd9\u4e2a\u60c5\u51b5\uff0c\u60f3\u8d77\u81ea\u5df1\u5176\u5b9e\u4e5f\u7ecf\u5e38\u78b0\u5230\u3002<\/p>\n<pre><code>p = pyaudio.PyAudio() <\/code><\/pre>\n<\/li>\n<\/ul>\n<h1>\u95ee\u9898\u70b9<\/h1>\n<p> <\/p>\n<ul>\n<li>\n<p>\u5047\u8bbe <strong>\u5355\u6587\u4ef6\uff0c\u5355\u529f\u80fd\uff0c\u5355\u51fd\u6570<\/strong>\uff0c\u4f46 <strong>\u540d\u79f0\u8f83\u957f<\/strong>\u3002<\/p>\n<\/li>\n<li>\n<p>\u5047\u8bbe\u6709\u5f88\u591a\u8fd1\u4f3c\u7684\u529f\u80fd\uff0c\u7136\u540e\u6211\u5e0c\u671b\u5c3d\u91cf\u5728\u540d\u79f0\u4e0a\u4ee5\u533a\u522b\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u6587\u4ef6\u540d\u548c\u6240\u5305\u542b\u7684\u4e3b\u51fd\u6570 \/\u7c7b\u540d\u4e00\u81f4\uff0c\u90a3\u4e24\u4e2a\u90fd\u662f\u4e0a\u9762\u90a3\u4e2a\u957f\u957f\u7684\u540d\u5b57\u3002<\/p>\n<\/li>\n<li>\n<p>\u7136\u540e\u7b2c\u4e09\u65b9\u6587\u4ef6\u8c03\u7528\u7684\u65f6\u5019\uff0c\u5c31\u4f1a\u53d8\u6210\uff1a<\/p>\n<pre><code>from a_very_very_long_file_name import a_very_very_long_module_name <\/code><\/pre>\n<\/li>\n<li>\n<p>\u800c\u4e14\u5f88\u591a\u65f6\u5019\u4e24\u4e2a\u540d\u5b57\u662f\u4e00\u6837\u7684\uff0c\u6700\u591a\u5927\u5c0f\u5199\u533a\u522b\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u60f3\u770b\u770b\u5927\u5bb6\u7684\u5904\u7406\u4e60\u60ef\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"714079\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/www.python.org\/dev\/peps\/pep-0008\/#id41 <\/p>\n<p>https:\/\/www.python.org\/dev\/peps\/pep-0008\/#package-and-module-names<\/p>\n<p>\u8ddf\u7740 PEP8 \u8d70\u633a\u7701\u4e8b, \u867d\u7136\u6709\u65f6\u5019 linter \u4e0d\u63d0\u9192&#8230;<\/p>\n<p>\u81f3\u4e8e\u540d\u5b57\u4e00\u6837, \u6211\u7ecf\u5e38 repositories name, package name \u4e00\u6837, \u5176\u4ed6\u60c5\u51b5\u5f88\u5c11\u4e00\u6837, \u4ece\u5355\u4e00\u804c\u8d23\u6765\u8bf4, \u7c7b\u540d\u548c\u5305\u540d\u4e00\u6837\u4e5f\u6ca1\u4ec0\u4e48\u95ee\u9898, \u8fd1\u4f3c\u529f\u80fd\u53c2\u8003\u9ad8\u5185\u805a, \u4f4e\u8026\u5408\u90a3\u4e9b\u8bbe\u8ba1\u539f\u5219, \u6709\u65f6\u5019\u770b\u770b\u90a3\u4e9b\u8001\u5916\u7684\u6e90\u7801, \u4f1a\u5b66\u5230\u5f88\u591a\u8d77\u540d\u5b57\u7684\u597d\u4e60\u60ef                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"714080\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ClericPy \u547d\u540d\u89c4\u8303\u73b0\u5728\u662f\u6309 google \u90a3\u5957\u5728\u505a\uff0c\u5c31\u662f\u540c\u540d\u5bfc\u5165\u770b\u8d77\u6765\u633a\u8822\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"714081\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MrGba2z <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Use from x import y as z if two modules named y are to be imported or if y is an inconveniently long name.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"714082\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : AAdalao <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pycharm \u8981\u6c42\u51e0\u4e4e\u6240\u6709\u7684\u5730\u65b9\u90fd\u7528\u5c0f\u5199\uff0c\u51fd\u6570\u540d\u53d8\u91cf\u540d\uff0c\u5c40\u90e8\u53d8\u91cf\u3002\u3002\u7740\u5b9e\u96be\u53d7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"714083\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @MrGba2z \u4e0d\u662f\u8fd9\u4e2a\u95ee\u9898 \uff0c\u662f x \u548c y \u91cd\u590d\uff0c\u4e0d\u662f\u4e24\u4e2a y \u91cd\u590d\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"714084\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : JCZ2MkKb5S8ZX9pq <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @AAdalao \u5c40\u90e8\u53d8\u91cf\u5f00\u5934\u52a0\u4e2a\u4e0b\u5212\u7ebf\uff1f<br \/>\u5076\u5c14\u6709\u8fc7\u5199\u5c40\u90e8\u53d8\u91cf\u628a\u51fd\u6570\u7ed9\u8986\u76d6\u4e86\u2026\u2026                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Python \u7684\u4e00\u4e2a\u547d\u540d\u4e60\u60ef\u7684\u95ee\u9898&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\/98534"}],"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=98534"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/98534\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=98534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=98534"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=98534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}