<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nandakagoodvibes</author_name>
  <author_url>https://blog.hatena.ne.jp/nandakagoodvibes/</author_url>
  <blog_title>なんだかGoodVibes</blog_title>
  <blog_url>https://nandakagoodvibes.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>こんにちは。 本日はPythonメモです。 概要 サンプルコード 引数 shellについての注意 概要 subprocessモジュールは標準ライブラリです。 このモジュールを使用することで 外部コマンドやプログラムを実行することができます。 本記事では、以下のディレクトリ構成を準備して試します。 tmp └ hoge.txt サンプルコード subprocess.runは引数に指定したコマンドを同期で実行します。 戻り値は、CompletedProcessオブジェクトです。 import subprocess result = subprocess.run(['ls', './tmp'], c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnandakagoodvibes.hatenablog.com%2Fentry%2F2024%2F09%2F22%2F184013&quot; title=&quot;【Python】subprocess.runを使用してコマンドを実行する - なんだかGoodVibes&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-09-22 18:40:13</published>
  <title>【Python】subprocess.runを使用してコマンドを実行する</title>
  <type>rich</type>
  <url>https://nandakagoodvibes.hatenablog.com/entry/2024/09/22/184013</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
