<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
  </categories>
  <description>概要 以前、contextlib.suppress についてメモしたのですが devlights.hatenablog.com contextlibモジュールさんには、他にも便利な関数が用意されていまして 結構個人的に利用しているのが、以下です。 contextlib.redirect_stdout 29.6. contextlib — with 文コンテキスト用ユーティリティ — Python 3.6.3 ドキュメント この関数は何をしてくれるかというと、名前の通り一時的に標準出力つまり、sys.stdoutの出力先を変更してくれるコンテキストマネージャを返してくれます。 例えば、pytho…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2018%2F02%2F20%2F001449&quot; title=&quot;Pythonメモ-64 (contextlib.redirect_stdout) (stdoutの矛先を一時的に変更する, redirect_stderr) - いろいろ備忘録日記&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>2018-02-20 00:14:49</published>
  <title>Pythonメモ-64 (contextlib.redirect_stdout) (stdoutの矛先を一時的に変更する, redirect_stderr)</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2018/02/20/001449</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
