{"id":2187,"date":"2024-10-27T17:35:31","date_gmt":"2024-10-27T09:35:31","guid":{"rendered":"https:\/\/www.zhiwanyuzhou.com\/?p=2187"},"modified":"2024-10-27T17:35:32","modified_gmt":"2024-10-27T09:35:32","slug":"python%e5%ad%97%e8%8a%82%e7%a0%81%e6%b5%85%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.zhiwanyuzhou.com\/index.php\/2024\/10\/27\/python%e5%ad%97%e8%8a%82%e7%a0%81%e6%b5%85%e6%9e%90\/","title":{"rendered":"Python\u5b57\u8282\u7801\u6d45\u6790"},"content":{"rendered":"\n<h2>\u4e00\u3001\u524d\u8a00<\/h2>\n\n\n\n<p>\u5b57\u8282\u7801\u662f\u4e00\u79cd\u7531 Python \u89e3\u91ca\u5668\u6267\u884c\u7684\u4e2d\u95f4\u4ee3\u7801\u5f62\u5f0f\u3002\u5f53\u4f60\u8fd0\u884c Python \u7a0b\u5e8f\u65f6\uff0c\u89e3\u91ca\u5668\u9996\u5148\u4f1a\u5c06\u6e90\u4ee3\u7801\u8f6c\u6362\u4e3a\u5b57\u8282\u7801\uff0c\u7136\u540e\u9010\u6761\u6267\u884c\u5b57\u8282\u7801\u6307\u4ee4\u6765\u5b8c\u6210\u7a0b\u5e8f\u7684\u8fd0\u884c\u3002\u5b57\u8282\u7801\u7c7b\u4f3c\u4e8e\u673a\u5668\u7801\uff0c\u4f46\u4e0e\u7279\u5b9a\u7684\u786c\u4ef6\u5e73\u53f0\u65e0\u5173\uff0c\u56e0\u6b64\u53ef\u4ee5\u5728\u4e0d\u540c\u7684\u5e73\u53f0\u4e0a\u8fd0\u884c\u76f8\u540c\u7684\u5b57\u8282\u7801\u3002<\/p>\n\n\n\n<p>\u4e0e\u76f4\u63a5\u89e3\u91ca\u6e90\u4ee3\u7801\u76f8\u6bd4\uff0c\u5b57\u8282\u7801\u5177\u6709\u4e00\u4e9b\u4f18\u52bf\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u66f4\u5feb\u7684\u6267\u884c\u901f\u5ea6<\/strong>\uff1a\u7531\u4e8e\u5b57\u8282\u7801\u662f\u4e00\u79cd\u4e2d\u95f4\u5f62\u5f0f\uff0c\u5b83\u6bd4\u89e3\u91ca\u6e90\u4ee3\u7801\u66f4\u63a5\u8fd1\u673a\u5668\u6307\u4ee4\u3002\u56e0\u6b64\uff0c\u89e3\u91ca\u5668\u53ef\u4ee5\u66f4\u9ad8\u6548\u5730\u6267\u884c\u5b57\u8282\u7801\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6267\u884c\u901f\u5ea6\u3002<\/li>\n\n\n\n<li><strong>\u8de8\u5e73\u53f0\u53ef\u79fb\u690d\u6027<\/strong>\uff1a\u7531\u4e8e\u5b57\u8282\u7801\u4e0e\u7279\u5b9a\u7684\u786c\u4ef6\u5e73\u53f0\u65e0\u5173\uff0c\u4f60\u53ef\u4ee5\u5c06\u5b57\u8282\u7801\u6587\u4ef6\u5728\u4e0d\u540c\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\uff0c\u800c\u65e0\u9700\u91cd\u65b0\u7f16\u8bd1\u6e90\u4ee3\u7801\u3002<\/li>\n\n\n\n<li><strong>\u4fdd\u62a4\u6e90\u4ee3\u7801<\/strong>\uff1a\u5b57\u8282\u7801\u6587\u4ef6\u4e0d\u5305\u542b\u5b8c\u6574\u7684\u6e90\u4ee3\u7801\uff0c\u56e0\u6b64\u53ef\u4ee5\u7528\u4f5c\u4ee3\u7801\u4fdd\u62a4\u7684\u4e00\u79cd\u624b\u6bb5\u3002\u5176\u4ed6\u4eba\u65e0\u6cd5\u76f4\u63a5\u67e5\u770b\u548c\u4fee\u6539\u6e90\u4ee3\u7801\uff0c\u53ea\u80fd\u6267\u884c\u5b57\u8282\u7801\u3002<\/li>\n<\/ul>\n\n\n\n<h2>\u4e8c\u3001\u751f\u6210\u5b57\u8282\u7801<\/h2>\n\n\n\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5148\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684python\u4ee3\u7801<\/p>\n\n\n\n<pre class=\"wp-block-code has-palette-color-4-color has-palette-color-8-background-color has-text-color has-background\"><code>print(\"hello world\")\r<\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u5b57\u8282\u7801\u6587\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code has-palette-color-4-color has-palette-color-8-background-color has-text-color has-background\"><code># python3\n$ python3 -m py_compile hello.py\n\u6216\u8005\n$ python3 -m compileall hello.py\n\n# python2 \u4e5f\u53ef\u4ee5\u76f4\u63a5\u8fd9\u6837\u751f\u6210\n$ python2 -m hello.py<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5728\u540c\u76ee\u5f55\u4e0b\u4f1a\u751f\u6210\u4e00\u4e2a\u201c__pycache__\u201d\u6587\u4ef6\u5939\uff0c\u91cc\u9762\u5305\u542b\u4e00\u4e2apyc\u6587\u4ef6\uff0c\u5982\u679c\u662fpython2\u5c31\u5728\u5f53\u524d\u76ee\u5f55\u751f\u6210\u4e00\u4e2apyc\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"611\" height=\"248\" src=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-2.png\" alt=\"\" class=\"wp-image-2190\" srcset=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-2.png?v=1729913471 611w, https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-2-300x122.png?v=1729913471 300w\" sizes=\"(max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<p>\u540c\u4e00python\u7248\u672c\u7684\uff0c\u53ea\u80fd\u8fd0\u884c\u540c\u4e00\u7248\u672c\u7684pyc\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"624\" height=\"78\" src=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-4.png\" alt=\"\" class=\"wp-image-2193\" srcset=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-4.png?v=1729913676 624w, https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-4-300x38.png?v=1729913676 300w\" sizes=\"(max-width: 624px) 100vw, 624px\" \/><\/figure>\n\n\n\n<h2>\u4e09\u3001\u6587\u4ef6\u7ed3\u6784<\/h2>\n\n\n\n<p>\u6211\u4eec\u4f7f\u7528hexdump\u5206\u522b\u4ee516\u8fdb\u5236\u7684\u683c\u5f0f\u6253\u5370python3\u3001python2\u7684\u5b57\u8282\u7801<\/p>\n\n\n\n<pre class=\"wp-block-code has-palette-color-4-color has-palette-color-8-background-color has-text-color has-background\"><code>$ hexdump -C __pycache__\/hello.cpython-38.pyc \n          <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-palette-color-3-color\">00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F<\/mark>\n00000000  55 0d 0d 0a 00 00 00 00  4c 60 1c 67 15 00 00 00  |U.......L`.g....|\n00000010  e3 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|\n00000020  00 02 00 00 00 40 00 00  00 73 0c 00 00 00 65 00  |.....@...s....e.|\n00000030  64 00 83 01 01 00 64 01  53 00 29 02 7a 0b 68 65  |d.....d.S.).z.he|\n00000040  6c 6c 6f 20 77 6f 72 6c  64 4e 29 01 da 05 70 72  |llo worldN)...pr|\n00000050  69 6e 74 a9 00 72 02 00  00 00 72 02 00 00 00 fa  |int..r....r.....|\n00000060  08 68 65 6c 6c 6f 2e 70  79 da 08 3c 6d 6f 64 75  |.hello.py..&lt;modu|\n00000070  6c 65 3e 01 00 00 00 f3  00 00 00 00              |le>.........|\n0000007c\n$ hexdump -C hello.pyc\n          <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-palette-color-3-color\">00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F<\/mark>\n00000000  03 f3 0d 0a 4c 60 1c 67  63 00 00 00 00 00 00 00  |....L`.gc.......|\n00000010  00 01 00 00 00 40 00 00  00 73 09 00 00 00 64 00  |.....@...s....d.|\n00000020  00 47 48 64 01 00 53 28  02 00 00 00 73 0b 00 00  |.GHd..S(....s...|\n00000030  00 68 65 6c 6c 6f 20 77  6f 72 6c 64 4e 28 00 00  |.hello worldN(..|\n00000040  00 00 28 00 00 00 00 28  00 00 00 00 28 00 00 00  |..(....(....(...|\n00000050  00 73 08 00 00 00 68 65  6c 6c 6f 2e 70 79 74 08  |.s....hello.pyt.|\n00000060  00 00 00 3c 6d 6f 64 75  6c 65 3e 01 00 00 00 74  |...&lt;module>....t|\n00000070  00 00 00 00                                       |....|\n00000074<\/code><\/pre>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u6e05\u695a\u7684\u770b\u5230\u4e0d\u540c\u7248\u672c\u7684pyc\u7ed3\u6784\u662f\u6709\u4e9b\u8bb8\u4e0d\u4e00\u6837\u7684\uff0c\u8fd9\u91cc\u4ee5python3\u4e3a\u4f8b<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\u504f\u79fb<\/td><td>\u503c<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>0x00-0x03<\/td><td>0x0A0D0D55<\/td><td>\u9b54\u6570\uff08magic number\uff09\uff0c0x0D55=3411<\/td><\/tr><tr><td>0x04-0x07<\/td><td>0<\/td><td>\u586b\u5145\u4e3a\u7a7a<\/td><\/tr><tr><td>0x08-0x0B<\/td><td>0x671C604C=1729912908<\/td><td>\u6e90\u4ee3\u7801\u6700\u540e\u66f4\u65b0\u65f6\u95f4\u6233<\/td><\/tr><tr><td>0x0C-0x0F<\/td><td>0x15<\/td><td>\u6e90\u4ee3\u7801\u6587\u4ef6\u7684\u5927\u5c0f<\/td><\/tr><tr><td>0x10-\u672b\u5c3e<\/td><td><\/td><td>\u5b57\u8282\u7801\u4e3b\u4f53<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4f7f\u7528dis\u3001marsha1\u6a21\u5757\u89e3\u6790\u5b57\u8282\u7801<\/p>\n\n\n\n<pre class=\"wp-block-code has-palette-color-4-color has-palette-color-8-background-color has-text-color has-background\"><code>import dis\nimport marshal\nimport struct\nimport time\nimport sys\nfrom rich import inspect\n\nfp = open(sys.argv&#91;1], 'rb')\n# \u9b54\u6570\nprint(\"magic code: 0x%X\"%(struct.unpack('&lt;l', fp.read(4))&#91;0]))\n# \u586b\u5145\nprint(f\"padding: {struct.unpack('&lt;l', fp.read(4))&#91;0]}\")\n# \u6e90\u4ee3\u7801\u6700\u540e\u66f4\u65b0\u65f6\u95f4\nt = struct.unpack('&lt;l', fp.read(4))&#91;0]\nprint(f\"last modified time: {time.asctime(time.localtime(t))}\")\n# \u6e90\u7801\u6587\u4ef6\u5927\u5c0f\nprint(f\"file size: {struct.unpack('&lt;l', fp.read(4))&#91;0]} Bytes\")\n\n# \u6784\u9020\u5b57\u8282\u7801code\u5bf9\u8c61\ncode_obj = marshal.load(fp)\n# \u67e5\u770b\u5b57\u8282\u7801\u5bf9\u8c61\u7c7b\u578b\nprint(f\"type: {type(code_obj)}\")\n# \u901a\u8fc7\u524d\u9762\u4ecb\u7ecd\u7684rich\u7684inspect()\u8fdb\u884ccode\u5bf9\u8c61\u7684\u68c0\u89c6\uff1a\ninspect(code_obj)\n# \u67e5\u770b\u5b57\u8282\u7801\u6307\u4ee4\u5e8f\u5217\ndis.dis(code_obj)<\/code><\/pre>\n\n\n\n<p>\u89e3\u6790\u7684\u7ed3\u679c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"708\" height=\"681\" src=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-6.png\" alt=\"\" class=\"wp-image-2198\" srcset=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-6.png?v=1730016341 708w, https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-6-300x289.png?v=1730016341 300w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><\/figure>\n\n\n\n<p>\u6700\u540e\u7684\u662f\u6307\u4ee4\u5e8f\u5217\uff0c\u7c7b\u4f3c\u6c47\u7f16\u8bed\u8a00\uff0c\u5177\u4f53\u7684\u529f\u80fd\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\uff0c\u4ee5\u4e0a\u5927\u6982\u89e3\u91ca\u5982\u4e0b<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\u884c\u6570<\/td><td>\u7d22\u5f15<\/td><td>\u64cd\u4f5c\u7801<\/td><td>\u53c2\u6570<\/td><td>\u53c2\u6570\u5b9e\u9645\u503c<\/td><td>\u8bf4\u660e<\/td><\/tr><tr><td>1<\/td><td>0<\/td><td>LOAD_NAME<\/td><td>0<\/td><td>print<\/td><td>\u5c06\u4e0eco_consts[0]=\"print\" \u63a8\u5165\u6808\u9876 <\/td><\/tr><tr><td><\/td><td>2<\/td><td>LOAD_CONST<\/td><td>0<\/td><td>'hello world'<\/td><td>\u5c06co_consts[0]=\"hello world\" \u63a8\u5165\u6808\u9876<\/td><\/tr><tr><td><\/td><td>4<\/td><td>CALL_FUNCTION<\/td><td>1<\/td><td><\/td><td>\u8c03\u7528\u51fd\u6570<\/td><\/tr><tr><td><\/td><td>6<\/td><td>POP_TOP<\/td><td><\/td><td><\/td><td>\u5220\u9664\u5806\u6808\u9876\u90e8\uff08TOS\uff09\u9879<\/td><\/tr><tr><td><\/td><td>8<\/td><td>LOAD_CONST <\/td><td>1<\/td><td>None<\/td><td>\u5c06co_consts[1]=None \u63a8\u5165\u6808\u9876<\/td><\/tr><tr><td><\/td><td>10<\/td><td>RETURN_VALUE<\/td><td><\/td><td><\/td><td>\u8fd4\u56de TOS \u5230\u51fd\u6570\u7684\u8c03\u7528\u8005<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5982\u679c\u8981\u60f3\u67e5\u770b\u5f53\u524dpython3\u652f\u6301\u7684\u6240\u6709\u64cd\u4f5c\u7801\uff0c\u53ef\u4ee5\u8fd9\u6837\uff0c\u8fd9\u91cc\u7684\u7248\u672c\u4e3a3.8.10<\/p>\n\n\n\n<pre class=\"wp-block-code has-palette-color-4-color has-palette-color-8-background-color has-text-color has-background\"><code>import opcode  \nfor op in range(len(opcode.opname)):\n    if opcode.opname&#91;op]&#91;0] != '&lt;':\n        print('0x%.2X(%.3d): %s' % (op, op, opcode.opname&#91;op])) <\/code><\/pre>\n\n\n\n<p>\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-palette-color-4-color has-palette-color-8-background-color has-text-color has-background\"><code>0x01(001): POP_TOP\r\n0x02(002): ROT_TWO\r\n0x03(003): ROT_THREE\r\n0x04(004): DUP_TOP\r\n0x05(005): DUP_TOP_TWO\r\n0x06(006): ROT_FOUR\r\n0x09(009): NOP\r\n0x0A(010): UNARY_POSITIVE\r\n0x0B(011): UNARY_NEGATIVE\r\n0x0C(012): UNARY_NOT\r\n0x0F(015): UNARY_INVERT\r\n0x10(016): BINARY_MATRIX_MULTIPLY\r\n0x11(017): INPLACE_MATRIX_MULTIPLY\r\n0x13(019): BINARY_POWER\r\n0x14(020): BINARY_MULTIPLY\r\n0x16(022): BINARY_MODULO\r\n0x17(023): BINARY_ADD\r\n0x18(024): BINARY_SUBTRACT\r\n0x19(025): BINARY_SUBSCR\r\n0x1A(026): BINARY_FLOOR_DIVIDE\r\n0x1B(027): BINARY_TRUE_DIVIDE\r\n0x1C(028): INPLACE_FLOOR_DIVIDE\r\n0x1D(029): INPLACE_TRUE_DIVIDE\r\n0x32(050): GET_AITER\r\n0x33(051): GET_ANEXT\r\n0x34(052): BEFORE_ASYNC_WITH\r\n0x35(053): BEGIN_FINALLY\r\n0x36(054): END_ASYNC_FOR\r\n0x37(055): INPLACE_ADD\r\n0x38(056): INPLACE_SUBTRACT\r\n0x39(057): INPLACE_MULTIPLY\r\n0x3B(059): INPLACE_MODULO\r\n0x3C(060): STORE_SUBSCR\r\n0x3D(061): DELETE_SUBSCR\r\n0x3E(062): BINARY_LSHIFT\r\n0x3F(063): BINARY_RSHIFT\r\n0x40(064): BINARY_AND\r\n0x41(065): BINARY_XOR\r\n0x42(066): BINARY_OR\r\n0x43(067): INPLACE_POWER\r\n0x44(068): GET_ITER\r\n0x45(069): GET_YIELD_FROM_ITER\r\n0x46(070): PRINT_EXPR\r\n0x47(071): LOAD_BUILD_CLASS\r\n0x48(072): YIELD_FROM\r\n0x49(073): GET_AWAITABLE\r\n0x4B(075): INPLACE_LSHIFT\r\n0x4C(076): INPLACE_RSHIFT\r\n0x4D(077): INPLACE_AND\r\n0x4E(078): INPLACE_XOR\r\n0x4F(079): INPLACE_OR\r\n0x51(081): WITH_CLEANUP_START\r\n0x52(082): WITH_CLEANUP_FINISH\r\n0x53(083): RETURN_VALUE\r\n0x54(084): IMPORT_STAR\r\n0x55(085): SETUP_ANNOTATIONS\r\n0x56(086): YIELD_VALUE\r\n0x57(087): POP_BLOCK\r\n0x58(088): END_FINALLY\r\n0x59(089): POP_EXCEPT\r\n0x5A(090): STORE_NAME\r\n0x5B(091): DELETE_NAME\r\n0x5C(092): UNPACK_SEQUENCE\r\n0x5D(093): FOR_ITER\r\n0x5E(094): UNPACK_EX\r\n0x5F(095): STORE_ATTR\r\n0x60(096): DELETE_ATTR\r\n0x61(097): STORE_GLOBAL\r\n0x62(098): DELETE_GLOBAL\r\n0x64(100): LOAD_CONST\r\n0x65(101): LOAD_NAME\r\n0x66(102): BUILD_TUPLE\r\n0x67(103): BUILD_LIST\r\n0x68(104): BUILD_SET\r\n0x69(105): BUILD_MAP\r\n0x6A(106): LOAD_ATTR\r\n0x6B(107): COMPARE_OP\r\n0x6C(108): IMPORT_NAME\r\n0x6D(109): IMPORT_FROM\r\n0x6E(110): JUMP_FORWARD\r\n0x6F(111): JUMP_IF_FALSE_OR_POP\r\n0x70(112): JUMP_IF_TRUE_OR_POP\r\n0x71(113): JUMP_ABSOLUTE\r\n0x72(114): POP_JUMP_IF_FALSE\r\n0x73(115): POP_JUMP_IF_TRUE\r\n0x74(116): LOAD_GLOBAL\r\n0x7A(122): SETUP_FINALLY\r\n0x7C(124): LOAD_FAST\r\n0x7D(125): STORE_FAST\r\n0x7E(126): DELETE_FAST\r\n0x82(130): RAISE_VARARGS\r\n0x83(131): CALL_FUNCTION\r\n0x84(132): MAKE_FUNCTION\r\n0x85(133): BUILD_SLICE\r\n0x87(135): LOAD_CLOSURE\r\n0x88(136): LOAD_DEREF\r\n0x89(137): STORE_DEREF\r\n0x8A(138): DELETE_DEREF\r\n0x8D(141): CALL_FUNCTION_KW\r\n0x8E(142): CALL_FUNCTION_EX\r\n0x8F(143): SETUP_WITH\r\n0x90(144): EXTENDED_ARG\r\n0x91(145): LIST_APPEND\r\n0x92(146): SET_ADD\r\n0x93(147): MAP_ADD\r\n0x94(148): LOAD_CLASSDEREF\r\n0x95(149): BUILD_LIST_UNPACK\r\n0x96(150): BUILD_MAP_UNPACK\r\n0x97(151): BUILD_MAP_UNPACK_WITH_CALL\r\n0x98(152): BUILD_TUPLE_UNPACK\r\n0x99(153): BUILD_SET_UNPACK\r\n0x9A(154): SETUP_ASYNC_WITH\r\n0x9B(155): FORMAT_VALUE\r\n0x9C(156): BUILD_CONST_KEY_MAP\r\n0x9D(157): BUILD_STRING\r\n0x9E(158): BUILD_TUPLE_UNPACK_WITH_CALL\r\n0xA0(160): LOAD_METHOD\r\n0xA1(161): CALL_METHOD\r\n0xA2(162): CALL_FINALLY\r\n0xA3(163): POP_FINALLY<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2>\u56db\u3001\u4ee3\u7801\u8fd8\u539f<\/h2>\n\n\n\n<p>\u8fd8\u539f\u4ee3\u7801\u53ef\u4ee5\u4f7f\u7528uncompyle6\u3001pycdc\uff0c\u4f46\u662f\u5982\u679cpython\u89e3\u91ca\u5668\u52a0\u4ee5\u4fee\u6539\u5b57\u8282\u7801\u5c31\u53ef\u80fd\u65e0\u6cd5\u89e3\u6790\u4e86\uff0c\u6240\u4ee5\u8fd8\u662f\u8981\u5b66\u4f1a\u770b\u6307\u4ee4\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"685\" height=\"381\" src=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-7.png\" alt=\"\" class=\"wp-image-2199\" srcset=\"https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-7.png?v=1730016638 685w, https:\/\/www.zhiwanyuzhou.com\/wp-content\/uploads\/2024\/10\/image-7-300x167.png?v=1730016638 300w\" sizes=\"(max-width: 685px) 100vw, 685px\" \/><\/figure>\n\n\n\n<h2>\u4e94\u3001\u53c2\u8003\u6587\u6863<\/h2>\n\n\n\n<p><a href=\"https:\/\/baijiahao.baidu.com\/s?id=1803643939985376783\">https:\/\/baijiahao.baidu.com\/s?id=1803643939985376783<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/baijiahao.baidu.com\/s?id=1771566595672540367\">https:\/\/baijiahao.baidu.com\/s?id=1771566595672540367<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"http:\/\/www.360doc.com\/content\/22\/1208\/11\/81250822_1059437643.shtml\" target=\"_blank\">http:\/\/www.360doc.com\/content\/22\/1208\/11\/81250822_1059437643.shtml<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.python.org\/zh-cn\/3.9\/library\/dis.html#dis.Bytecode\">https:\/\/docs.python.org\/zh-cn\/3.9\/library\/dis.html#dis.Bytecode<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.python.org\/zh-cn\/3.9\/library\/marshal.html\">https:\/\/docs.python.org\/zh-cn\/3.9\/library\/marshal.html<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/zhuanlan.zhihu.com\/p\/66252396\">https:\/\/zhuanlan.zhihu.com\/p\/66252396<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.bilibili.com\/read\/cv22813564\/\">https:\/\/www.bilibili.com\/read\/cv22813564\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u524d\u8a00 \u5b57\u8282\u7801\u662f\u4e00\u79cd\u7531 Python \u89e3\u91ca\u5668\u6267\u884c\u7684\u4e2d\u95f4\u4ee3\u7801\u5f62\u5f0f\u3002\u5f53\u4f60\u8fd0\u884c Python \u7a0b\u5e8f\u65f6\uff0c\u89e3\u91ca\u5668\u9996\u5148\u4f1a\u5c06\u6e90\u4ee3\u7801\u8f6c\u6362\u4e3a\u5b57\u8282\u7801\uff0c\u7136\u540e\u9010\u6761\u6267\u884c\u5b57\u8282\u7801\u6307\u4ee4\u6765\u5b8c\u6210\u7a0b\u5e8f\u7684\u8fd0\u884c\u3002\u5b57\u8282\u7801\u7c7b\u4f3c\u4e8e\u673a\u5668\u7801\uff0c\u4f46\u4e0e\u7279\u5b9a\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"_links":{"self":[{"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2187"}],"collection":[{"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=2187"}],"version-history":[{"count":5,"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2187\/revisions"}],"predecessor-version":[{"id":2200,"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/posts\/2187\/revisions\/2200"}],"wp:attachment":[{"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=2187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=2187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhiwanyuzhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=2187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}