{"id":1053707,"date":"2024-12-31T14:36:10","date_gmt":"2024-12-31T06:36:10","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1053707.html"},"modified":"2024-12-31T14:36:13","modified_gmt":"2024-12-31T06:36:13","slug":"python%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e4%b8%a4%e4%b8%aa%e6%88%aa%e5%9b%be%e7%9b%b8%e5%90%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1053707.html","title":{"rendered":"python\u5982\u4f55\u5224\u65ad\u4e24\u4e2a\u622a\u56fe\u76f8\u540c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/32792f8f-d89a-40a9-9c9e-943085419adb.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u5224\u65ad\u4e24\u4e2a\u622a\u56fe\u76f8\u540c\" \/><\/p>\n<p><p> <strong>Python \u5224\u65ad\u4e24\u4e2a\u622a\u56fe\u662f\u5426\u76f8\u540c\uff1a<\/strong><\/p>\n<\/p>\n<p><p><strong>\u53ef\u4ee5\u4f7f\u7528\u56fe\u50cf\u6bd4\u8f83\u5e93\u3001\u4f7f\u7528\u54c8\u5e0c\u6bd4\u8f83\u65b9\u6cd5\u3001\u4f7f\u7528\u7ed3\u6784\u76f8\u4f3c\u5ea6\u65b9\u6cd5\uff0c\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528\u56fe\u50cf\u6bd4\u8f83\u5e93\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2a\u5e93\u6765\u6bd4\u8f83\u4e24\u4e2a\u622a\u56fe\u662f\u5426\u76f8\u540c\u3002<strong>\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u4e4b\u4e00\u662f\u4f7f\u7528Pillow\u5e93\u6765\u52a0\u8f7d\u56fe\u50cf\u5e76\u4f7f\u7528ImageChops\u6a21\u5757\u8fdb\u884c\u6bd4\u8f83\u3002<\/strong>\u53e6\u4e00\u79cd\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528OpenCV\u5e93\u8fdb\u884c\u56fe\u50cf\u5904\u7406\u548c\u6bd4\u8f83\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u56fe\u50cf\u6bd4\u8f83\u5e93<\/h3>\n<\/p>\n<p><h4>1. \u4f7f\u7528Pillow\u5e93<\/h4>\n<\/p>\n<p><p>Pillow\u662fPython Imaging Library (PIL) \u7684\u4e00\u4e2a\u53cb\u597d\u5206\u652f\uff0c\u5b83\u4e3aPython\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u56fe\u50cf\u5904\u7406\u80fd\u529b\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Pillow\u5e93\u4e2d\u7684ImageChops\u6a21\u5757\u6765\u6bd4\u8f83\u4e24\u5f20\u56fe\u7247\u662f\u5426\u76f8\u540c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from PIL import Image, ImageChops<\/p>\n<p>def images_are_equal(image1_path, image2_path):<\/p>\n<p>    image1 = Image.open(image1_path)<\/p>\n<p>    image2 = Image.open(image2_path)<\/p>\n<p>    diff = ImageChops.difference(image1, image2)<\/p>\n<p>    if diff.getbbox() is None:<\/p>\n<p>        return True<\/p>\n<p>    else:<\/p>\n<p>        return False<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>image1_path = &#39;path_to_image1.png&#39;<\/p>\n<p>image2_path = &#39;path_to_image2.png&#39;<\/p>\n<p>result = images_are_equal(image1_path, image2_path)<\/p>\n<p>print(f&quot;Images are equal: {result}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c<code>ImageChops.difference<\/code> \u65b9\u6cd5\u8ba1\u7b97\u4e24\u5f20\u56fe\u7247\u7684\u9010\u50cf\u7d20\u5dee\u5f02\u3002\u5982\u679c\u5dee\u5f02\u56fe\u7684\u8fb9\u754c\u6846 (<code>bbox<\/code>) \u4e3a <code>None<\/code>\uff0c\u5219\u8868\u793a\u4e24\u5f20\u56fe\u7247\u76f8\u540c\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f7f\u7528OpenCV\u5e93<\/h4>\n<\/p>\n<p><p>OpenCV\uff08Open Source Computer Vision Library\uff09\u662f\u4e00\u4e2a\u5f00\u6e90\u8ba1\u7b97\u673a\u89c6\u89c9\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u8f6f\u4ef6\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u5f88\u591a\u56fe\u50cf\u5904\u7406\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u6765\u6bd4\u8f83\u4e24\u5f20\u56fe\u7247\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<p>def images_are_equal(image1_path, image2_path):<\/p>\n<p>    image1 = cv2.imread(image1_path)<\/p>\n<p>    image2 = cv2.imread(image2_path)<\/p>\n<p>    if image1.shape == image2.shape:<\/p>\n<p>        difference = cv2.subtract(image1, image2)<\/p>\n<p>        b, g, r = cv2.split(difference)<\/p>\n<p>        if cv2.countNonZero(b) == 0 and cv2.countNonZero(g) == 0 and cv2.countNonZero(r) == 0:<\/p>\n<p>            return True<\/p>\n<p>    return False<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>image1_path = &#39;path_to_image1.png&#39;<\/p>\n<p>image2_path = &#39;path_to_image2.png&#39;<\/p>\n<p>result = images_are_equal(image1_path, image2_path)<\/p>\n<p>print(f&quot;Images are equal: {result}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>cv2.imread<\/code> \u65b9\u6cd5\u52a0\u8f7d\u56fe\u50cf\uff0c\u5e76\u4f7f\u7528 <code>cv2.subtract<\/code> \u65b9\u6cd5\u8ba1\u7b97\u4e24\u5f20\u56fe\u7247\u7684\u5dee\u5f02\u3002\u7136\u540e\u6211\u4eec\u68c0\u67e5\u5dee\u5f02\u56fe\u50cf\u7684\u6bcf\u4e2a\u901a\u9053\uff08\u84dd\u8272\u3001\u7eff\u8272\u548c\u7ea2\u8272\uff09\u662f\u5426\u90fd\u662f\u96f6\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u54c8\u5e0c\u6bd4\u8f83\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u54c8\u5e0c\u6bd4\u8f83\u662f\u4e00\u79cd\u5e38\u7528\u7684\u56fe\u50cf\u6bd4\u8f83\u65b9\u6cd5\u3002\u5176\u57fa\u672c\u601d\u60f3\u662f\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u54c8\u5e0c\u503c\uff0c\u7136\u540e\u6bd4\u8f83\u54c8\u5e0c\u503c\u662f\u5426\u76f8\u540c\u3002\u5e38\u7528\u7684\u54c8\u5e0c\u7b97\u6cd5\u6709\u611f\u77e5\u54c8\u5e0c\uff08pHash\uff09\u3001\u5e73\u5747\u54c8\u5e0c\uff08aHash\uff09\u548c\u5dee\u5f02\u54c8\u5e0c\uff08dHash\uff09\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528\u611f\u77e5\u54c8\u5e0c\uff08pHash\uff09<\/h4>\n<\/p>\n<p><p>pHash \u662f\u4e00\u79cd\u57fa\u4e8e\u56fe\u50cf\u5185\u5bb9\u7684\u54c8\u5e0c\u7b97\u6cd5\uff0c\u53ef\u4ee5\u7528\u4e8e\u6bd4\u8f83\u56fe\u50cf\u76f8\u4f3c\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import imagehash<\/p>\n<p>from PIL import Image<\/p>\n<p>def images_are_equal(image1_path, image2_path):<\/p>\n<p>    image1 = Image.open(image1_path)<\/p>\n<p>    image2 = Image.open(image2_path)<\/p>\n<p>    hash1 = imagehash.phash(image1)<\/p>\n<p>    hash2 = imagehash.phash(image2)<\/p>\n<p>    return hash1 == hash2<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>image1_path = &#39;path_to_image1.png&#39;<\/p>\n<p>image2_path = &#39;path_to_image2.png&#39;<\/p>\n<p>result = images_are_equal(image1_path, image2_path)<\/p>\n<p>print(f&quot;Images are equal: {result}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>imagehash<\/code> \u5e93\u7684 <code>phash<\/code> \u65b9\u6cd5\u8ba1\u7b97\u56fe\u50cf\u7684\u611f\u77e5\u54c8\u5e0c\u503c\uff0c\u5e76\u6bd4\u8f83\u4e24\u4e2a\u54c8\u5e0c\u503c\u662f\u5426\u76f8\u540c\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f7f\u7528\u5e73\u5747\u54c8\u5e0c\uff08aHash\uff09<\/h4>\n<\/p>\n<p><p>\u5e73\u5747\u54c8\u5e0c\u662f\u4e00\u79cd\u7b80\u5355\u7684\u56fe\u50cf\u54c8\u5e0c\u7b97\u6cd5\uff0c\u8ba1\u7b97\u56fe\u50cf\u7684\u5e73\u5747\u7070\u5ea6\u503c\uff0c\u5e76\u5c06\u6bcf\u4e2a\u50cf\u7d20\u4e0e\u5e73\u5747\u503c\u8fdb\u884c\u6bd4\u8f83\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import imagehash<\/p>\n<p>from PIL import Image<\/p>\n<p>def images_are_equal(image1_path, image2_path):<\/p>\n<p>    image1 = Image.open(image1_path)<\/p>\n<p>    image2 = Image.open(image2_path)<\/p>\n<p>    hash1 = imagehash.average_hash(image1)<\/p>\n<p>    hash2 = imagehash.average_hash(image2)<\/p>\n<p>    return hash1 == hash2<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>image1_path = &#39;path_to_image1.png&#39;<\/p>\n<p>image2_path = &#39;path_to_image2.png&#39;<\/p>\n<p>result = images_are_equal(image1_path, image2_path)<\/p>\n<p>print(f&quot;Images are equal: {result}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>imagehash<\/code> \u5e93\u7684 <code>average_hash<\/code> \u65b9\u6cd5\u8ba1\u7b97\u56fe\u50cf\u7684\u5e73\u5747\u54c8\u5e0c\u503c\uff0c\u5e76\u6bd4\u8f83\u4e24\u4e2a\u54c8\u5e0c\u503c\u662f\u5426\u76f8\u540c\u3002<\/p>\n<\/p>\n<p><h4>3. \u4f7f\u7528\u5dee\u5f02\u54c8\u5e0c\uff08dHash\uff09<\/h4>\n<\/p>\n<p><p>\u5dee\u5f02\u54c8\u5e0c\u662f\u4e00\u79cd\u57fa\u4e8e\u56fe\u50cf\u50cf\u7d20\u5dee\u5f02\u7684\u54c8\u5e0c\u7b97\u6cd5\uff0c\u901a\u8fc7\u8ba1\u7b97\u76f8\u90bb\u50cf\u7d20\u4e4b\u95f4\u7684\u5dee\u5f02\u6765\u751f\u6210\u54c8\u5e0c\u503c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import imagehash<\/p>\n<p>from PIL import Image<\/p>\n<p>def images_are_equal(image1_path, image2_path):<\/p>\n<p>    image1 = Image.open(image1_path)<\/p>\n<p>    image2 = Image.open(image2_path)<\/p>\n<p>    hash1 = imagehash.dhash(image1)<\/p>\n<p>    hash2 = imagehash.dhash(image2)<\/p>\n<p>    return hash1 == hash2<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>image1_path = &#39;path_to_image1.png&#39;<\/p>\n<p>image2_path = &#39;path_to_image2.png&#39;<\/p>\n<p>result = images_are_equal(image1_path, image2_path)<\/p>\n<p>print(f&quot;Images are equal: {result}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>imagehash<\/code> \u5e93\u7684 <code>dhash<\/code> \u65b9\u6cd5\u8ba1\u7b97\u56fe\u50cf\u7684\u5dee\u5f02\u54c8\u5e0c\u503c\uff0c\u5e76\u6bd4\u8f83\u4e24\u4e2a\u54c8\u5e0c\u503c\u662f\u5426\u76f8\u540c\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528\u7ed3\u6784\u76f8\u4f3c\u5ea6\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u7ed3\u6784\u76f8\u4f3c\u5ea6\uff08SSIM\uff09\u662f\u4e00\u79cd\u8861\u91cf\u4e24\u5f20\u56fe\u7247\u76f8\u4f3c\u5ea6\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u540c\u65f6\u8003\u8651\u4eae\u5ea6\u3001\u5bf9\u6bd4\u5ea6\u548c\u7ed3\u6784\u4fe1\u606f\u3002\u53ef\u4ee5\u4f7f\u7528 <code>scikit-image<\/code> \u5e93\u4e2d\u7684 <code>compare_ssim<\/code> \u65b9\u6cd5\u6765\u8ba1\u7b97\u7ed3\u6784\u76f8\u4f3c\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<p>from skimage.metrics import structural_similarity as ssim<\/p>\n<p>def images_are_equal(image1_path, image2_path, threshold=0.99):<\/p>\n<p>    image1 = cv2.imread(image1_path, cv2.IMREAD_GRAYSCALE)<\/p>\n<p>    image2 = cv2.imread(image2_path, cv2.IMREAD_GRAYSCALE)<\/p>\n<p>    score, _ = ssim(image1, image2, full=True)<\/p>\n<p>    return score &gt;= threshold<\/p>\n<h2><strong>\u793a\u4f8b\u7528\u6cd5<\/strong><\/h2>\n<p>image1_path = &#39;path_to_image1.png&#39;<\/p>\n<p>image2_path = &#39;path_to_image2.png&#39;<\/p>\n<p>result = images_are_equal(image1_path, image2_path)<\/p>\n<p>print(f&quot;Images are equal: {result}&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 <code>compare_ssim<\/code> \u65b9\u6cd5\u8ba1\u7b97\u4e24\u5f20\u56fe\u7247\u7684\u7ed3\u6784\u76f8\u4f3c\u5ea6\u5f97\u5206\uff0c\u5e76\u4e0e\u9608\u503c\u8fdb\u884c\u6bd4\u8f83\u3002\u5f97\u5206\u5927\u4e8e\u7b49\u4e8e\u9608\u503c\u8868\u793a\u4e24\u5f20\u56fe\u7247\u76f8\u4f3c\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6bd4\u8f83\u4e24\u4e2a\u622a\u56fe\u662f\u5426\u76f8\u540c\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4f9b\u9009\u62e9\u3002<strong>\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528\u56fe\u50cf\u6bd4\u8f83\u5e93\uff0c\u5982Pillow\u548cOpenCV\u3002<\/strong>\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u7f3a\u70b9\uff0c\u9009\u62e9\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684\u65b9\u6cd5\u5373\u53ef\u3002\u4f7f\u7528\u54c8\u5e0c\u6bd4\u8f83\u65b9\u6cd5\uff08\u5982pHash\u3001aHash\u548cdHash\uff09\u53ef\u4ee5\u5feb\u901f\u6bd4\u8f83\u56fe\u50cf\u76f8\u4f3c\u5ea6\uff0c\u800c\u4f7f\u7528\u7ed3\u6784\u76f8\u4f3c\u5ea6\u65b9\u6cd5\uff08SSIM\uff09\u53ef\u4ee5\u66f4\u7cbe\u786e\u5730\u8861\u91cf\u56fe\u50cf\u76f8\u4f3c\u5ea6\u3002\u6839\u636e\u5177\u4f53\u5e94\u7528\u573a\u666f\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u80fd\u591f\u66f4\u597d\u5730\u89e3\u51b3\u95ee\u9898\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u6bd4\u8f83\u4e24\u4e2a\u56fe\u50cf\u7684\u76f8\u4f3c\u5ea6\uff1f<\/strong><br \/>\u53ef\u4ee5\u4f7f\u7528Python\u4e2d\u7684\u56fe\u50cf\u5904\u7406\u5e93\uff0c\u5982OpenCV\u6216Pillow\uff0c\u6765\u6bd4\u8f83\u4e24\u4e2a\u622a\u56fe\u7684\u76f8\u4f3c\u5ea6\u3002\u901a\u8fc7\u8ba1\u7b97\u4e24\u4e2a\u56fe\u50cf\u7684\u5dee\u5f02\u3001\u5747\u65b9\u8bef\u5dee\uff08MSE\uff09\u6216\u7ed3\u6784\u76f8\u4f3c\u6027\u6307\u6570\uff08SSIM\uff09\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5224\u65ad\u5b83\u4eec\u662f\u5426\u76f8\u540c\u3002OpenCV\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u8bfb\u53d6\u3001\u5904\u7406\u548c\u6bd4\u8f83\u56fe\u50cf\uff0c\u800cPillow\u5219\u66f4\u52a0\u6613\u4e8e\u4f7f\u7528\uff0c\u9002\u5408\u7b80\u5355\u7684\u56fe\u50cf\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u5904\u7406\u56fe\u50cf\u4ee5\u4fbf\u8fdb\u884c\u6bd4\u8f83\uff1f<\/strong><br \/>\u5904\u7406\u56fe\u50cf\u7684\u7b2c\u4e00\u6b65\u901a\u5e38\u662f\u5c06\u5176\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf\uff0c\u51cf\u5c11\u5904\u7406\u590d\u6742\u5ea6\u3002\u63a5\u7740\uff0c\u53ef\u4ee5\u4f7f\u7528resize\u529f\u80fd\u5c06\u4e24\u5e45\u56fe\u50cf\u8c03\u6574\u5230\u76f8\u540c\u7684\u5c3a\u5bf8\uff0c\u4ee5\u786e\u4fdd\u6bd4\u8f83\u65f6\u7684\u4e00\u81f4\u6027\u3002\u4f7f\u7528OpenCV\u7684<code>cv2.cvtColor<\/code>\u51fd\u6570\u53ef\u4ee5\u8f7b\u677e\u5b8c\u6210\u989c\u8272\u7a7a\u95f4\u7684\u8f6c\u6362\uff0c\u4f7f\u7528<code>cv2.resize<\/code>\u53ef\u4ee5\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\u3002<\/p>\n<p><strong>\u5982\u679c\u4e24\u4e2a\u622a\u56fe\u7684\u5927\u5c0f\u4e0d\u540c\uff0c\u8be5\u5982\u4f55\u5904\u7406\uff1f<\/strong><br \/>\u5f53\u4e24\u4e2a\u622a\u56fe\u7684\u5927\u5c0f\u4e0d\u4e00\u81f4\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u5c06\u8f83\u5927\u7684\u56fe\u50cf\u7f29\u5c0f\uff0c\u6216\u5c06\u8f83\u5c0f\u7684\u56fe\u50cf\u653e\u5927\u81f3\u76f8\u540c\u7684\u5c3a\u5bf8\u3002\u4f7f\u7528OpenCV\u6216Pillow\u7684resize\u529f\u80fd\u662f\u5e38\u89c1\u505a\u6cd5\u3002\u540c\u65f6\uff0c\u8981\u786e\u4fdd\u5728\u8c03\u6574\u5c3a\u5bf8\u65f6\u4fdd\u6301\u56fe\u50cf\u7684\u6bd4\u4f8b\uff0c\u4ee5\u907f\u514d\u5931\u771f\uff0c\u8fd9\u6837\u80fd\u66f4\u51c6\u786e\u5730\u6bd4\u8f83\u56fe\u50cf\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python \u5224\u65ad\u4e24\u4e2a\u622a\u56fe\u662f\u5426\u76f8\u540c\uff1a \u53ef\u4ee5\u4f7f\u7528\u56fe\u50cf\u6bd4\u8f83\u5e93\u3001\u4f7f\u7528\u54c8\u5e0c\u6bd4\u8f83\u65b9\u6cd5\u3001\u4f7f\u7528\u7ed3\u6784\u76f8\u4f3c\u5ea6\u65b9\u6cd5\uff0c\u6700\u5e38\u7528\u7684\u662f\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1053724,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1053707"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1053707"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1053707\/revisions"}],"predecessor-version":[{"id":1053725,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1053707\/revisions\/1053725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1053724"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1053707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1053707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1053707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}