{"id":2540,"date":"2025-05-21T00:00:16","date_gmt":"2025-05-20T16:00:16","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/"},"modified":"2025-05-21T00:00:16","modified_gmt":"2025-05-20T16:00:16","slug":"python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/","title":{"rendered":"Python\u5c04\u51fb\u5c0f\u6e38\u620f"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"htmledit_views tomorrow-night\" id=\"content_views\">\n<p>\n   \u592a\u7a7a\u5c04\u51fb\n  <\/p>\n<p>\n   \u57fa\u672c\u53c2\u6570\u8bbe\u7f6e\u53ca\u521d\u59cb\u5316\n  <\/p>\n<pre><code class=\"language-python\">#\u5bfc\u5165\u6a21\u5757\nimport pygame\nimport random\nfrom os import path\n#\u83b7\u53d6\u56fe\u7247\u5e93\u548c\u58f0\u97f3\u5e93\u8def\u5f84\nimg_dir = path.join(path.dirname(__file__), 'assets') #\u56fe\u7247\u8def\u5f84\nsound_folder = path.join(path.dirname(__file__), 'sounds') #\u58f0\u97f3\u8def\u5f84\n#\u5b9a\u4e49\u6e38\u620f\u7a97\u53e3\u3001\u73a9\u5bb6\u8840\u91cf\u6761\u5c3a\u5bf8\uff0c\u6e38\u620f\u8fd0\u884c\u901f\u5ea6\u3001\u70ae\u706b\u6301\u7eed\u65f6\u95f4\u7b49\u53c2\u6570\nWIDTH = 480 #\u5b9a\u4e49\u6e38\u620f\u7a97\u53e3\u5927\u5c0f\nHEIGHT = 600\nFPS = 60 #\u6e38\u620f\u8fd0\u884c\u901f\u5ea6\nPOWERUP_TIME = 5000 #\u70ae\u706b\u6301\u7eed\u65f6\u95f4\nBAR_LENGTH = 100 #\u8840\u91cf\u6761\u5c3a\u5bf8\nBAR_HEIGHT = 10\n\n# \u5b9a\u4e49\u767d\u3001\u9ed1\u3001\u7ea2\u3001\u7eff\u3001\u84dd\u3001\u9ec4\u7684RGB\u53c2\u6570\nWHITE = (255, 255, 255)\nBLACK = (0, 0, 0)\nRED = (255, 0, 0)\nGREEN = (0, 255, 0)\nBLUE = (0, 0, 255)\nYELLOW = (255, 255, 0)\n\n#\u521d\u59cb\u5316pygame\u6a21\u5757\uff0c\u521b\u5efa\u6e38\u620f\u7a97\u53e3\u3001\u6e38\u620f\u7a97\u53e3\u547d\u540d\u3001\u521b\u5efa\u8ddf\u8e2a\u65f6\u95f4\u5bf9\u8c61\npygame.init() #\u521d\u59cb\u5316\u5c06\u5bfc\u5165\u6240\u6709pygame\u7684\u6a21\u5757\npygame.mixer.init()  ## \u521d\u59cb\u5316\u6df7\u97f3\u5668\u6a21\u5757\nscreen = pygame.display.set_mode((WIDTH, HEIGHT)) #\u8bbe\u7f6e\u6e38\u620f\u7a97\u53e3\u5927\u5c0f\npygame.display.set_caption(\"spaceShooter\") #\u8bbe\u7f6e\u6807\u9898\nclock = pygame.time.Clock()     ## \u521b\u5efa\u65f6\u949f\u5bf9\u8c61 \u7528\u4e8eFPS\u540c\u6b65\n\n#\u83b7\u53d6\u5b57\u4f53arial\u6240\u5728\u8def\u5f84\nfont_name = pygame.font.match_font('arial')\n\n<\/code><\/pre>\n<\/p>\n<p>\n   \u52a0\u8f7d\u56fe\u7247\n  <\/p>\n<\/p>\n<pre><code class=\"language-python\">#\u52a0\u8f7d\u6e38\u620f\u80cc\u666f\u56fe\u7247\nbackground = pygame.image.load(path.join(img_dir, 'starfield.png')).convert()\nbackground_rect = background.get_rect() #\u83b7\u53d6\u80cc\u666f\u56fe\u7247\u7684\u77e9\u5f62\u533a\u57df\n#\u52a0\u8f7d\u98de\u673a\u56fe\u7247\nplayer_img = pygame.image.load(path.join(img_dir, 'playerShip1_orange.png')).convert() #\u98de\u673a\u56fe\u7247\nplayer_mini_img = pygame.transform.scale(player_img, (25, 19))\nplayer_mini_img.set_colorkey(BLACK)\n#\u52a0\u8f7d\u98de\u673a\u70ae\u5f39\u3001\u5bfc\u5f39\u56fe\u7247\nbullet_img = pygame.image.load(path.join(img_dir, 'laserRed16.png')).convert()\nmissile_img = pygame.image.load(path.join(img_dir, 'missile.png')).convert_alpha()\n#\u52a0\u8f7d\u654c\u4eba\u56fe\u7247\nmeteor_images = []\nmeteor_list = [\n    'meteorBrown_big1.png',\n    'meteorBrown_big2.png', \n    'meteorBrown_med1.png', \n    'meteorBrown_med3.png',\n    'meteorBrown_small1.png',\n    'meteorBrown_small2.png',\n    'meteorBrown_tiny1.png'\n]\n\nfor image in meteor_list:\n    meteor_images.append(pygame.image.load(path.join(img_dir, image)).convert())\n#\u52a0\u8f7d\u76fe\u724c\u3001\u95ea\u7535\u56fe\u7247\npowerup_images = {}\npowerup_images['shield'] = pygame.image.load(path.join(img_dir, 'shield_gold.png')).convert()\npowerup_images['gun'] = pygame.image.load(path.join(img_dir, 'bolt_gold.png')).convert()\n# \u52a0\u8f7d\u7206\u70b8\u6548\u679c\u56fe\nexplosion_anim = {}\nexplosion_anim['lg'] = []\nexplosion_anim['sm'] = []\nexplosion_anim['player'] = []\nfor i in range(9):\n    #\u654c\u4eba\u7206\u70b8\n    filename = 'regularExplosion0{}.png'.format(i)\n    img = pygame.image.load(path.join(img_dir, filename)).convert()\n    img.set_colorkey(BLACK)\n    #\u5927\u7206\u70b8  \n    img_lg = pygame.transform.scale(img, (75, 75)) #\u5c06\u7206\u70b8\u56fe\u7247\u7f29\u653e\u523075\u00d775\n    explosion_anim['lg'].append(img_lg)\n    #\u5c0f\u7206\u70b8  \n    img_sm = pygame.transform.scale(img, (32, 32)) #\u5c06\u7206\u70b8\u56fe\u7247\u7f29\u653e\u523032\u00d732\n    explosion_anim['sm'].append(img_sm)\n\n    #\u73a9\u5bb6\u7206\u70b8\n    filename = 'sonicExplosion0{}.png'.format(i)\n    img = pygame.image.load(path.join(img_dir, filename)).convert()\n    img.set_colorkey(BLACK)\n    explosion_anim['player'].append(img)\n\n<\/code><\/pre>\n<\/p>\n<p>\n   \u52a0\u8f7d\u58f0\u97f3\n  <\/p>\n<\/p>\n<pre><code class=\"language-python\">#\u52a0\u8f7d\u70ae\u5f39\u3001\u5bfc\u5f39\u53d1\u5c04\u58f0\u97f3    \nshooting_sound = pygame.mixer.Sound(path.join(sound_folder, 'pew.wav'))\nmissile_sound = pygame.mixer.Sound(path.join(sound_folder, 'rocket.ogg'))  \n#\u52a0\u8f7d\u654c\u4eba\u7206\u70b8\u58f0\u97f3\nexpl_sounds = []\nfor sound in ['expl3.wav', 'expl6.wav']:\n    expl_sounds.append(pygame.mixer.Sound(path.join(sound_folder, sound)))\n#\u52a0\u8f7d\u73a9\u5bb6\u7206\u70b8\u7684\u58f0\u97f3\nplayer_die_sound = pygame.mixer.Sound(path.join(sound_folder, 'rumble1.ogg'))\n#\u8c03\u4f4e\u97f3\u91cf\npygame.mixer.music.set_volume(0.2)\n\n<\/code><\/pre>\n<\/p>\n<p>\n   \u6e38\u620f\u5f00\u59cb\u754c\u9762\u51fd\u6570\n  <\/p>\n<\/p>\n<pre><code class=\"language-python\">def main_menu():\n    global screen\n    menu_song = pygame.mixer.music.load(path.join(sound_folder, \"menu.ogg\")) #\u52a0\u8f7d\u6e38\u620f\u521d\u59cb\u754c\u9762\u80cc\u666f\u97f3\u4e50\n    pygame.mixer.music.play(-1<\/code><\/pre>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u592a\u7a7a\u5c04\u51fb \u57fa\u672c\u53c2\u6570\u8bbe\u7f6e\u53ca\u521d\u59cb\u5316 #\u5bfc\u5165\u6a21\u5757 import pygame import random from  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2540","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python\u5c04\u51fb\u5c0f\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python\u5c04\u51fb\u5c0f\u6e38\u620f\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u5c04\u51fb\u5c0f\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u592a\u7a7a\u5c04\u51fb \u57fa\u672c\u53c2\u6570\u8bbe\u7f6e\u53ca\u521d\u59cb\u5316 #\u5bfc\u5165\u6a21\u5757 import pygame import random from [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python\u5c04\u51fb\u5c0f\u6e38\u620f\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-20T16:00:16+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Python\u5c04\u51fb\u5c0f\u6e38\u620f\",\"datePublished\":\"2025-05-20T16:00:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/\"},\"wordCount\":1,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u5c04\u51fb\u6e38\u620f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/\",\"name\":\"Python\u5c04\u51fb\u5c0f\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-05-20T16:00:16+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u5c04\u51fb\u5c0f\u6e38\u620f\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.wunen.com\/#website\",\"url\":\"http:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"http:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"http:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python\u5c04\u51fb\u5c0f\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python\u5c04\u51fb\u5c0f\u6e38\u620f\/","og_locale":"zh_CN","og_type":"article","og_title":"Python\u5c04\u51fb\u5c0f\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u592a\u7a7a\u5c04\u51fb \u57fa\u672c\u53c2\u6570\u8bbe\u7f6e\u53ca\u521d\u59cb\u5316 #\u5bfc\u5165\u6a21\u5757 import pygame import random from [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python\u5c04\u51fb\u5c0f\u6e38\u620f\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-05-20T16:00:16+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/"},"author":{"name":"admin@wunen","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Python\u5c04\u51fb\u5c0f\u6e38\u620f","datePublished":"2025-05-20T16:00:16+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/"},"wordCount":1,"commentCount":0,"publisher":{"@id":"http:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u5c04\u51fb\u6e38\u620f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/","name":"Python\u5c04\u51fb\u5c0f\u6e38\u620f - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"http:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-05-20T16:00:16+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/05\/21\/python%e5%b0%84%e5%87%bb%e5%b0%8f%e6%b8%b8%e6%88%8f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Python\u5c04\u51fb\u5c0f\u6e38\u620f"}]},{"@type":"WebSite","@id":"http:\/\/www.wunen.com\/#website","url":"http:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"http:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"http:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"http:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/2540","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=2540"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/2540\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=2540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=2540"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=2540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}