{"id":3173,"date":"2026-11-21T13:15:27","date_gmt":"2026-11-21T04:15:27","guid":{"rendered":"https:\/\/danlabs.kr\/?p=3173"},"modified":"2026-11-21T13:15:58","modified_gmt":"2026-11-21T04:15:58","slug":"python-subprocess-run-check-timeout-2","status":"publish","type":"post","link":"https:\/\/danlabs.kr\/?p=3173","title":{"rendered":"Python subprocess.run, \uc885\ub8cc \ucf54\ub4dc\uc640 \uc2dc\uac04 \ucd08\uacfc\ub97c \ub530\ub85c \ucc98\ub9ac\ud574\uc694"},"content":{"rendered":"<p>\uc678\ubd80 \uba85\ub839\uc744 \uc2e4\ud589\ud588\ub294\ub370 \uc624\ub958 \uba54\uc2dc\uc9c0\ub9cc \ucd9c\ub825\ub418\uace0 \ub2e4\uc74c \uc791\uc5c5\uc774 \uacc4\uc18d\ub418\ub294 \uacbd\uc6b0\uac00 \uc788\uc5b4\uc694. Python\uc758 <code>subprocess.run()<\/code>\uc740 \uae30\ubcf8\uac12\uc5d0\uc11c 0\uc774 \uc544\ub2cc \uc885\ub8cc \ucf54\ub4dc\ub97c \uc608\uc678\ub85c \ubc14\uafb8\uc9c0 \uc54a\uae30 \ub54c\ubb38\uc774\uc5d0\uc694. \uc790\ub3d9\ud654 \ucf54\ub4dc\uc5d0\uc11c\ub294 <strong>\uba85\ub839\uc758 \uc2e4\ud328\uc640 \uae30\ub2e4\ub9ac\ub294 \uc2dc\uac04\uc758 \ucd08\uacfc\ub97c \ub530\ub85c \ucc98\ub9ac<\/strong>\ud574\uc57c \uc2e4\ud328 \uc720\ud615\uc744 \uad6c\ubd84\ud560 \uc218 \uc788\uc5b4\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup><\/p>\n<p>\uc608\ub97c \ub4e4\uc5b4 CSV \ubcc0\ud658\uae30\ub97c \uc2e4\ud589\ud55c \ub4a4 \uacb0\uacfc\ub97c \uc5c5\ub85c\ub4dc\ud558\ub294 \uc791\uc5c5\uc774\ub77c\uba74, \ubcc0\ud658\uc774 \uc2e4\ud328\ud588\ub294\ub370 \uc5c5\ub85c\ub4dc \ub2e8\uacc4\uae4c\uc9c0 \ub118\uc5b4\uac00\uba74 \uace4\ub780\ud574\uc694. \uba3c\uc800 \uc790\uc2dd \ud504\ub85c\uc138\uc2a4\uc758 \uc885\ub8cc \ucf54\ub4dc\ub97c \uac80\uc0ac\ud558\uace0, \uc624\ub958 \ucd9c\ub825\uc740 \uc9c4\ub2e8\uc6a9\uc73c\ub85c \ub0a8\uae30\ub294 \ud750\ub984\uc774 \ud544\uc694\ud574\uc694.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-inline1.jpg\" alt=\"subprocess.run\uc5d0\uc11c stdout\uacfc stderr\ub97c \ubd84\ub9ac\ud574 \uc7a1\ub294 AI \uc0dd\uc131 \uac1c\ub150 \ub3c4\uc2dd\" width=\"1280\" height=\"720\" loading=\"lazy\"><figcaption>\ud45c\uc900 \ucd9c\ub825\uacfc \ud45c\uc900 \uc624\ub958\ub97c \ubd84\ub9ac\ud55c AI \uc0dd\uc131 \uac1c\ub150 \ub3c4\uc2dd. \uc2e4\uc81c \uc2e4\ud589 \ud654\uba74\uc774 \uc544\ub2c8\uc5d0\uc694.<\/figcaption><\/figure>\n<h2>\uba85\ub839\uacfc \uc778\uc790\ub294 \ub9ac\uc2a4\ud2b8\ub85c \ub118\uaca8\uc694<\/h2>\n<p><code>run()<\/code>\uc740 \uba85\ub839\uc774 \ub05d\ub0a0 \ub54c\uae4c\uc9c0 \uae30\ub2e4\ub9b0 \ub4a4 <code>CompletedProcess<\/code>\ub97c \ubc18\ud658\ud574\uc694. \uccab \uc778\uc790\uc5d0\ub294 \uc2e4\ud589 \ud30c\uc77c\uacfc \uc778\uc790\ub97c \ub2f4\uc740 \ub9ac\uc2a4\ud2b8\ub97c \ub123\uc744 \uc218 \uc788\uc5b4\uc694. \uc774 \uc608\uc81c\ub294 \ubcc4\ub3c4 \ub3c4\uad6c\ub97c \uc124\uce58\ud558\uc9c0 \uc54a\uace0 \uac19\uc740 Python\uc744 \uc790\uc2dd \ud504\ub85c\uc138\uc2a4\ub85c \uc2e4\ud589\ud574 \ub3d9\uc791\uc744 \ud655\uc778\ud574\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup><\/p>\n<pre><code class=\"language-python\">import subprocess\nimport sys\n\n\ndef run_python(code, timeout=3):\n    return subprocess.run(\n        [sys.executable, &quot;-c&quot;, code],\n        capture_output=True,\n        text=True,\n        encoding=&quot;utf-8&quot;,\n        check=True,\n        timeout=timeout,\n    )<\/code><\/pre>\n<p><code>sys.executable<\/code>\uc740 \ud604\uc7ac Python \uc2e4\ud589 \ud30c\uc77c\uc758 \uacbd\ub85c\uc608\uc694. \uacf5\uc2dd \ubb38\uc11c\ub3c4 \uac19\uc740 \uc778\ud130\ud504\ub9ac\ud130\ub97c \ub2e4\uc2dc \uc2e4\ud589\ud560 \ub54c \uc774 \uac12\uc744 \uad8c\ud574\uc694. \ub2e4\ub9cc Python\uc774 \uc2e4\ud589 \ud30c\uc77c \uacbd\ub85c\ub97c \uc54c\uc544\ub0b4\uc9c0 \ubabb\ud55c \ud658\uacbd\uc5d0\uc11c\ub294 \ube48 \ubb38\uc790\uc5f4\uc774\ub098 <code>None<\/code>\uc77c \uc218 \uc788\uc73c\ubbc0\ub85c, \uadf8\ub7f0 \ud658\uacbd\uc5d0 \ubc30\ud3ec\ud55c\ub2e4\uba74 \uc2e4\ud589 \uacbd\ub85c\ubd80\ud130 \uc815\ud574\uc57c \ud574\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup><sup><a href=\"#source-2\">[2]<\/a><\/sup><\/p>\n<p>\uc5ec\uae30\uc11c\ub294 \uae30\ubcf8\uac12\uc778 <code>shell=False<\/code>\ub97c \uc720\uc9c0\ud574\uc694. \uc178 \uba85\ub839 \ubb38\uc790\uc5f4\uc744 \uc870\ud569\ud558\uc9c0 \uc54a\uace0 \uc2e4\ud589 \ud30c\uc77c\uacfc \uc778\uc790\ub97c \ubd84\ub9ac\ud558\ub294 \ubc29\uc2dd\uc774\uc5d0\uc694. \uacf5\uc2dd \ubb38\uc11c\ub294 <code>shell=True<\/code>\ub97c \uba85\uc2dc\ud558\uba74 \uacf5\ubc31\uacfc \ud2b9\uc218\ubb38\uc790\ub97c \uc801\uc808\ud788 \uc778\uc6a9\ud574 \uc178 \uc8fc\uc785\uc744 \ub9c9\uc744 \ucc45\uc784\uc774 \ud638\ucd9c\uc790\uc5d0\uac8c \uc788\ub2e4\uace0 \uc124\uba85\ud574\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup> \uc774 \uc608\uc81c\uc758 <code>-c<\/code>\uc5d0\ub294 \uace0\uc815\ub41c \ud14c\uc2a4\ud2b8 \ucf54\ub4dc\ub9cc \ub123\uc5c8\uc5b4\uc694. \uc678\ubd80 \uc785\ub825\uc744 Python \ucf54\ub4dc\ub85c \uc2e4\ud589\ud558\ub294 \uc6a9\ub3c4\ub85c \uc4f0\uba74 \uc548 \ub3fc\uc694.<\/p>\n<h2>\ucd9c\ub825\uc740 \uc7a1\uace0, \uc885\ub8cc \ucf54\ub4dc\ub294 \uc608\uc678\ub85c \uc62c\ub824\uc694<\/h2>\n<p><code>capture_output=True<\/code>\ub294 \ud45c\uc900 \ucd9c\ub825\uacfc \ud45c\uc900 \uc624\ub958\ub97c \uac01\uac01 \uc7a1\uc544\uc694. <code>text=True<\/code>\uc640 <code>encoding=\"utf-8\"<\/code>\uc740 \uc7a1\uc740 \ucd9c\ub825\uc744 UTF-8 \ubb38\uc790\uc5f4\ub85c \uc77d\ub3c4\ub85d \uc9c0\uc815\ud574\uc694. \uc5ec\uae30\uc11c \uc9c0\uc815\ud55c \uc778\ucf54\ub529\uc740 \ubd80\ubaa8\uac00 \ucd9c\ub825\uc744 \uc77d\ub294 \uae30\uc900\uc774\ubbc0\ub85c, \uc2e4\uc81c \uc678\ubd80 \ud504\ub85c\uadf8\ub7a8\uc758 \ucd9c\ub825 \uc778\ucf54\ub529\uacfc \ub9de\ucdb0\uc57c \ud574\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup><\/p>\n<pre><code class=\"language-python\">ok = run_python(&quot;print(&#x27;done&#x27;)&quot;)\nprint(&quot;success:&quot;, ok.returncode, repr(ok.stdout), repr(ok.stderr))\n\ntry:\n    run_python(&quot;import sys; print(&#x27;bad input&#x27;, file=sys.stderr); sys.exit(7)&quot;)\nexcept subprocess.CalledProcessError as exc:\n    print(&quot;failed:&quot;, exc.returncode, repr(exc.stdout), repr(exc.stderr))<\/code><\/pre>\n<p><code>check=True<\/code>\ub97c \uc8fc\uba74 0\uc774 \uc544\ub2cc \uc885\ub8cc \ucf54\ub4dc\uc5d0\uc11c <code>CalledProcessError<\/code>\uac00 \ubc1c\uc0dd\ud574\uc694. \uc7a1\uc544 \ub454 \ucd9c\ub825\uc740 \uc608\uc678\uc758 <code>stdout<\/code>\uacfc <code>stderr<\/code>\uc5d0 \ub0a8\uace0, \uc885\ub8cc \ucf54\ub4dc\ub294 <code>returncode<\/code>\uc5d0\uc11c \uc77d\uc5b4\uc694. \uae30\ubcf8\uac12\uc778 <code>check=False<\/code>\ub97c \uc4f0\ub294 \ucf54\ub4dc\ub77c\uba74 \ud638\ucd9c\ud55c \ucabd\uc774 \uc9c1\uc811 <code>returncode<\/code>\ub97c \uac80\uc0ac\ud574\uc57c \ud574\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup><\/p>\n<p>\ud45c\uc900 \uc624\ub958\uc5d0 \uae00\uc790\uac00 \uc788\ub2e4\ub294 \uc774\uc720\ub9cc\uc73c\ub85c \uc2e4\ud328\ub97c \ud310\uc815\ud558\uc9c0\ub294 \uc54a\uc544\uc694. \uc774 \uc608\uc81c\uc5d0\uc11c \uc2e4\ud328\ub97c \uacb0\uc815\ud558\ub294 \uac83\uc740 <code>sys.exit(7)<\/code>\ub85c \uc815\ud55c \uc885\ub8cc \ucf54\ub4dc\uc774\uace0, <code>bad input<\/code>\uc740 \uc6d0\uc778\uc744 \uc124\uba85\ud558\ub294 \ucd9c\ub825\uc774\uc5d0\uc694. \ub450 \uc2a4\ud2b8\ub9bc\uc744 \ucc98\uc74c\ubd80\ud130 \ud569\uce58\uc9c0 \uc54a\uc740 \uc774\uc720\ub3c4 \uacb0\uacfc \ub370\uc774\ud130\uc640 \uc9c4\ub2e8 \uba54\uc2dc\uc9c0\ub97c \ubd84\ub9ac\ud558\uae30 \uc704\ud574\uc11c\uc608\uc694.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-inline2.jpg\" alt=\"check=True\uc77c \ub54c \uc885\ub8cc \ucf54\ub4dc 0\uacfc \ube44\uc815\uc0c1 \uc885\ub8cc\ub97c \uad6c\ubd84\ud55c AI \uc0dd\uc131 \uac1c\ub150 \ub3c4\uc2dd\" width=\"1280\" height=\"720\" loading=\"lazy\"><figcaption>check=True \uc124\uc815\uc5d0\uc11c \uc885\ub8cc \ucf54\ub4dc\ub97c \uad6c\ubd84\ud55c AI \uc0dd\uc131 \uac1c\ub150 \ub3c4\uc2dd.<\/figcaption><\/figure>\n<h2>\uc2dc\uac04 \ucd08\uacfc\ub294 \ub2e4\ub978 \uc608\uc678\ub85c \ub4e4\uc5b4\uc640\uc694<\/h2>\n<p>\uba85\ub839\uc774 \ub05d\ub098\uc9c0 \uc54a\ub294 \uacbd\uc6b0\uc5d0\ub294 <code>timeout<\/code>\uc774 \ud544\uc694\ud574\uc694. \uc55e\uc758 \ud568\uc218\ub294 \uae30\ubcf8 \ub300\uae30 \uc2dc\uac04\uc744 3\ucd08\ub85c \ub480\uace0, \uc544\ub798 \ud14c\uc2a4\ud2b8\uc5d0\uc11c\ub294 5\ucd08\ub97c \uc26c\ub294 \uc790\uc2dd \ud504\ub85c\uc138\uc2a4\uc5d0 1\ucd08 \uc81c\ud55c\uc744 \uc801\uc6a9\ud574\uc694.<\/p>\n<pre><code class=\"language-python\">try:\n    run_python(&quot;import time; print(&#x27;started&#x27;, flush=True); time.sleep(5)&quot;, timeout=1)\nexcept subprocess.TimeoutExpired as exc:\n    print(&quot;timeout:&quot;, exc.timeout, repr(exc.stdout))<\/code><\/pre>\n<p><code>run()<\/code>\uc740 \uc81c\ud55c \uc2dc\uac04\uc744 \ub118\uae34 \uc790\uc2dd \ud504\ub85c\uc138\uc2a4\ub97c \uc885\ub8cc\ud558\uace0 \uc885\ub8cc\ub97c \uae30\ub2e4\ub9b0 \ub4a4 <code>TimeoutExpired<\/code>\ub97c \ub2e4\uc2dc \ubc1c\uc0dd\uc2dc\ucf1c\uc694. \ud504\ub85c\uc138\uc2a4\ub97c \ucc98\uc74c \ub9cc\ub4dc\ub294 \ub2e8\uacc4\ub294 \ub9ce\uc740 \ud50c\ub7ab\ud3fc\uc5d0\uc11c \uc911\ub2e8\ud560 \uc218 \uc5c6\uc5b4\uc11c, \ud638\ucd9c \uc804\uccb4\uac00 \uc815\ud655\ud788 1\ucd08 \uc548\uc5d0 \ubc18\ud658\ub41c\ub2e4\uace0 \ubcf4\uc7a5\ub418\uc9c0\ub294 \uc54a\uc544\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup><\/p>\n<p>\ub610 \ud558\ub098 \ud5f7\uac08\ub9ac\uae30 \uc26c\uc6b4 \ucc28\uc774\uac00 \uc788\uc5b4\uc694. \uc815\uc0c1 \uacb0\uacfc\uc758 <code>stdout<\/code>\uc740 \uc704 \uc124\uc815\uc5d0\uc11c \ubb38\uc790\uc5f4\uc774\uc9c0\ub9cc, <code>TimeoutExpired<\/code>\uc5d0 \uc7a1\ud78c \ucd9c\ub825\uc740 <code>text=True<\/code>\uc5ec\ub3c4 \ubc14\uc774\ud2b8\uc608\uc694. \ucd9c\ub825\uc774 \uad00\uce21\ub418\uc9c0 \uc54a\uc558\ub2e4\uba74 <code>None<\/code>\uc77c \uc218\ub3c4 \uc788\uc5b4\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup> \ub530\ub77c\uc11c \uc608\uc678 \uacbd\ub85c\uc5d0\uc11c \ubb38\uc790\uc5f4 \uba54\uc11c\ub4dc\ub97c \ubc14\ub85c \ud638\ucd9c\ud558\uae30\ubcf4\ub2e4\ub294 \ud0c0\uc785\uacfc \uac12\uc758 \uc720\ubb34\ub97c \uba3c\uc800 \ub2e4\ub904\uc57c \ud574\uc694.<\/p>\n<h2>\uc2e4\uc81c \uc2e4\ud589\uc5d0\uc11c\ub294 \uc138 \uacbd\ub85c\uac00 \uac08\ub838\uc5b4\uc694<\/h2>\n<p>\uc704 \ucf54\ub4dc\ub97c \uc21c\uc11c\ub300\ub85c \ub123\uc740 <code>demo.py<\/code>\ub97c Linux\uc758 Python 3.14.7\uc5d0\uc11c \uc2e4\ud589\ud588\uc5b4\uc694. \ucd9c\ub825\uc5d0\ub294 \uc904\ubc14\uafc8\uc774 \ubcf4\uc774\ub3c4\ub85d <code>repr()<\/code>\uc744 \uc0ac\uc6a9\ud588\uc5b4\uc694.<\/p>\n<pre><code class=\"language-text\">success: 0 &#x27;done\\n&#x27; &#x27;&#x27;\nfailed: 7 &#x27;&#x27; &#x27;bad input\\n&#x27;\ntimeout: 1 b&#x27;started\\n&#x27;<\/code><\/pre>\n<p>\uc815\uc0c1 \uc885\ub8cc\ub294 <code>CompletedProcess<\/code>, \uc885\ub8cc \ucf54\ub4dc 7\uc740 <code>CalledProcessError<\/code>, \ub300\uae30 \ucd08\uacfc\ub294 <code>TimeoutExpired<\/code>\ub85c \ubd84\ub9ac\ub410\uc5b4\uc694. \ub9c8\uc9c0\ub9c9 \uc904\uc758 <code>b<\/code>\ub294 \uc2dc\uac04 \ucd08\uacfc \uc608\uc678\uc5d0 \ubcf4\uc874\ub41c \ucd9c\ub825\uc774 \ubc14\uc774\ud2b8\ub77c\ub294 \ucc28\uc774\ub3c4 \ubcf4\uc5ec \uc918\uc694. <code>flush=True<\/code>\ub294 \ub300\uae30 \uc804\uc5d0 \ucd9c\ub825\ud55c <code>started<\/code>\ub97c \uc989\uc2dc \ub0b4\ubcf4\ub0b4\uae30 \uc704\ud574 \ub123\uc5c8\uc5b4\uc694. \uc774 \uc2e4\ud589 \uacb0\uacfc\ub294 \uc704 \ub85c\uceec \uc608\uc81c\uc758 \uad00\ucc30\uc774\uba70, Windows\uc5d0\uc11c\uc758 \uc2e4\ud589 \uacb0\uacfc\ub294 \ud3ec\ud568\ud558\uc9c0 \uc54a\uc544\uc694.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-inline3.jpg\" alt=\"\uc2dc\uac04 \ucd08\uacfc \uc608\uc678\uc640 bytes \ub610\ub294 None\uc73c\ub85c \ub0a8\ub294 \ucd9c\ub825\uc744 \ud45c\ud604\ud55c AI \uc0dd\uc131 \uac1c\ub150 \ub3c4\uc2dd\" width=\"1280\" height=\"720\" loading=\"lazy\"><figcaption>\uc2dc\uac04 \ucd08\uacfc\uc640 \uc608\uc678\uc758 \ucd9c\ub825 \ud0c0\uc785\uc744 \uc124\uba85\ud558\ub294 AI \uc0dd\uc131 \uac1c\ub150 \ub3c4\uc2dd.<\/figcaption><\/figure>\n<p>\uc9e7\uc740 \uacb0\uacfc\ub97c \ubc1b\uc544 \ud6c4\uc18d \uc791\uc5c5\uc5d0 \ub118\uae30\ub294 \uc790\ub3d9\ud654\ub77c\uba74 \uc774 \uad6c\uc131\uc774 \ucd9c\ubc1c\uc810\uc774\uc5d0\uc694. \ucd9c\ub825\uc774 \ud06c\uac70\ub098 \ub05d\uc5c6\uc774 \uc774\uc5b4\uc9c0\ub294 \uba85\ub839\uc5d0\ub294 \ucea1\ucc98\ud55c \ub0b4\uc6a9\uc744 \uba54\ubaa8\ub9ac\uc5d0 \ubaa8\uc73c\ub294 \ubc29\uc2dd\uc774 \ub9de\uc9c0 \uc54a\uc544\uc694. \uacf5\uc2dd \ubb38\uc11c\ub3c4 \ud30c\uc774\ud504 \ub370\uc774\ud130\ub97c \uba54\ubaa8\ub9ac\uc5d0 \ubc84\ud37c\ub9c1\ud558\ubbc0\ub85c \ud070 \ucd9c\ub825\uc774\ub098 \ubb34\uc81c\ud55c \ucd9c\ub825\uc5d0\ub294 \ud574\ub2f9 \ubc29\uc2dd\uc744 \uc4f0\uc9c0 \ub9d0\ub77c\uace0 \uacbd\uace0\ud574\uc694.<sup><a href=\"#source-1\">[1]<\/a><\/sup> \uadf8\ub7f0 \uba85\ub839\uc740 \ud30c\uc77c\ub85c \ubcf4\ub0b4\uac70\ub098 \ucd9c\ub825\uc744 \uc810\uc9c4\uc801\uc73c\ub85c \ub2e4\ub8e8\ub294 \ubcc4\ub3c4 \uc124\uacc4\uac00 \ud544\uc694\ud574\uc694.<\/p>\n<p><a href=\"https:\/\/danlabs.kr\/?p=3137\">CSV \uc5f4 \ub204\ub77d\uacfc \ucd08\uacfc\ub97c \uac80\uc0ac\ud558\ub294 \uc608\uc81c<\/a>\uc640 \uc5f0\uacb0\ud574 \uc678\ubd80 \ubcc0\ud658 \ub2e8\uacc4\ub97c \ubd99\uc77c \ub54c\ub3c4 \uacbd\uacc4\ub294 \uac19\uc544\uc694. \ubcc0\ud658 \uacb0\uacfc\ub97c \uc77d\uae30 \uc804\uc5d0 \uc678\ubd80 \uba85\ub839\uc774 \uc131\uacf5\ud588\ub294\uc9c0 \uacb0\uc815\ud574\uc57c \ud574\uc694. \uc2e4\ud328\ub97c \uc7a1\uc740 \ub4a4\uc5d0\ub294 \uae30\ub85d\ub9cc \ud558\uace0 \uacc4\uc18d\ud560\uc9c0, \ud638\ucd9c\uc790\uc5d0\uac8c \ub2e4\uc2dc \uc608\uc678\ub97c \uc62c\ub9b4\uc9c0 \uc5c5\ubb34 \ud750\ub984\uc5d0 \ub9de\ucdb0 \uc815\ud574\uc57c \ud558\uace0\uc694. <code>except<\/code>\uc5d0\uc11c \uba54\uc2dc\uc9c0\ub9cc \ucc0d\uace0 \ub2e4\uc74c \ub2e8\uacc4\ub85c \ub118\uc5b4\uac00\uba74, <code>check=True<\/code>\ub97c \ub123\uc5c8\uc5b4\ub3c4 \uc6d0\ub798\uc758 \ubb38\uc81c\uac00 \ub0a8\uc544\uc694.<\/p>\n<p>\ubcf8\ubb38 \ub3c4\uc2dd\uc740 \uc124\uba85\uc744 \uc704\ud55c AI \uc0dd\uc131 \uac1c\ub150 \uc774\ubbf8\uc9c0\uc774\uba70 \uc2e4\uc81c \ud130\ubbf8\ub110 \ud654\uba74 \ucea1\ucc98\uac00 \uc544\ub2c8\uc5d0\uc694.<\/p>\n<p><strong>Sources<\/strong><\/p>\n<ol>\n<li id=\"source-1\"><a href=\"https:\/\/docs.python.org\/3.14\/library\/subprocess.html\" target=\"_blank\" rel=\"noopener noreferrer\">Python 3.14 subprocess \uacf5\uc2dd \ubb38\uc11c (2026-11-21 \uc870\ud68c)<\/a><\/li>\n<li id=\"source-2\"><a href=\"https:\/\/docs.python.org\/3.14\/library\/sys.html\" target=\"_blank\" rel=\"noopener noreferrer\">Python 3.14 sys.executable \uacf5\uc2dd \ubb38\uc11c (2026-11-21 \uc870\ud68c)<\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Python subprocess.run\uc758 check\u00b7timeout\u00b7capture_output\uc744 \uc2e4\ud589 \uc608\uc81c\ub85c \uc124\uba85\ud574\uc694. \uc885\ub8cc \ucf54\ub4dc \uc2e4\ud328\uc640 \uc2dc\uac04 \ucd08\uacfc, \uc608\uc678\uc5d0 \ub0a8\ub294 \ucd9c\ub825\uc758 \ud0c0\uc785 \ucc28\uc774\ub97c \ud655\uc778\ud588\uc5b4\uc694.<\/p>\n","protected":false},"author":1,"featured_media":3169,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-3173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev"],"featured_image_urls":{"full":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat.jpg",1280,720,false],"thumbnail":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat-150x150.jpg",150,150,true],"medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat-300x169.jpg",300,169,true],"medium_large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat-768x432.jpg",640,360,true],"large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat-1024x576.jpg",640,360,true],"1536x1536":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat.jpg",1280,720,false],"2048x2048":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat.jpg",1280,720,false],"morenews-large":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat.jpg",825,464,false],"morenews-medium":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat.jpg",590,332,false],"danlabs-list-small":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat-366x190.jpg",366,190,true],"danlabs-list-retina":["https:\/\/danlabs.kr\/wp-content\/uploads\/2026\/11\/dev-20261121-feat.jpg",1280,720,false]},"author_info":{"display_name":"DanLABs","author_link":"https:\/\/danlabs.kr\/author\/hello-danlabs-kr"},"category_info":"<a href=\"https:\/\/danlabs.kr\/?cat=19\" rel=\"category\">\uac1c\ubc1c<\/a>","tag_info":"\uac1c\ubc1c","comment_count":"1","_links":{"self":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/3173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3173"}],"version-history":[{"count":1,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/3173\/revisions"}],"predecessor-version":[{"id":3174,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/posts\/3173\/revisions\/3174"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=\/wp\/v2\/media\/3169"}],"wp:attachment":[{"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danlabs.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}