<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>s51517765</author_name>
  <author_url>https://blog.hatena.ne.jp/s51517765/</author_url>
  <blog_title>プログラミング素人のはてなブログ</blog_title>
  <blog_url>https://s51517765.hatenadiary.jp/</blog_url>
  <categories>
    <anon>python_3</anon>
  </categories>
  <description>pythonでよく使う処理を関数として作成し、他のプログラムから呼び出すことができます。main.py import a #a.pyをモジュールとして読み込む import b #b.pyをモジュールとして読み込む a.function() print(&quot;a is done.&quot;) b.function() print(&quot;b is done.&quot;) a.py print(&quot;start a.&quot;) def function(): print(&quot;This is a.&quot;) if __name__ == ‘__main__’: print(&quot;a is main.&quot;) function() b.py prin…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fs51517765.hatenadiary.jp%2Fentry%2F2017%2F10%2F15%2F174928&quot; title=&quot;Pythonの　 &amp;quot;if __name__ == ‘__main__’:&amp;quot;　とモジュール化 - プログラミング素人のはてなブログ&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>2017-10-15 17:49:28</published>
  <title>Pythonの　 &quot;if __name__ == ‘__main__’:&quot;　とモジュール化</title>
  <type>rich</type>
  <url>https://s51517765.hatenadiary.jp/entry/2017/10/15/174928</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
