<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>nai_62</author_name>
  <author_url>https://blog.hatena.ne.jp/nai_62/</author_url>
  <blog_title>naiの日記</blog_title>
  <blog_url>https://nai62.hatenablog.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>最近は趣味でChrome拡張機能の開発を行っていますが、Native MessagingのホストであるPythonプログラムから subprocess.check_call を実行すると、直後に実行中のTkinterウィンドウが閉じてプログラムが終了するという現象に見舞われました。最初は何らかのヤバイ例外が発生して親プロセスもろとも異常終了したのかと思いましたが、確認してみるとsubprocessから実行した処理は正常に終了しています。はて……？ 原因はsubprocessの標準出力を捕捉していないことでした。 subprocess.run などのメソッドはデフォルトで stdout=None…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnai62.hatenablog.jp%2Fentry%2F2024%2F06%2F11%2F180255&quot; title=&quot;Chrome Native Messagingのホストからsubprocessを呼ぶ際の注意点 - naiの日記&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-06-11 18:02:55</published>
  <title>Chrome Native Messagingのホストからsubprocessを呼ぶ際の注意点</title>
  <type>rich</type>
  <url>https://nai62.hatenablog.jp/entry/2024/06/11/180255</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
