{"provider_url":"https://hatena.blog","url":"https://pandazx.hatenablog.com/entry/2017/10/26/103835","author_name":"pandazx","version":"1.0","width":"100%","author_url":"https://blog.hatena.ne.jp/pandazx/","categories":["python"],"description":"\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304a\u3051\u3070\u3001sample.py \u304c\u4ed6\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u547c\u3070\u308c\u305f\u6642\u306b main()\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3092\u907f\u3051\u3089\u308c\u308b\u3002 # sample.py import sys def calc(val): x = val + 1 def main(): calc(1) if sys.argsv[0] == __file__: main() \u3053\u308c\u306b\u3088\u308a\u3001\u524d\u306b\u4f5c\u3063\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u6d41\u7528\u3057\u305f\u3044\u6642\u306b\u3001\u7c21\u5358\u306bimport\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002","blog_title":"pandazx's blog","blog_url":"https://pandazx.hatenablog.com/","title":"python2\u3067\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u306e\u5224\u5b9a","published":"2017-10-26 10:38:35","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpandazx.hatenablog.com%2Fentry%2F2017%2F10%2F26%2F103835\" title=\"python2\u3067\u5b9f\u884c\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u306e\u5224\u5b9a - pandazx&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","image_url":null,"height":"190"}