{"height":"190","blog_url":"https://nakamura001.hatenablog.com/","image_url":null,"author_name":"nakamura001","provider_url":"https://hatena.blog","blog_title":"\u5f37\u706b\u3067\u9032\u3081","author_url":"https://blog.hatena.ne.jp/nakamura001/","url":"https://nakamura001.hatenablog.com/entry/20080704/1215182932","type":"rich","width":"100%","published":"2008-07-04 23:48:52","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnakamura001.hatenablog.com%2Fentry%2F20080704%2F1215182932\" title=\"Python\u3067C\u8a00\u8a9e\u306e__LINE__\u3001__FILE__ - \u5f37\u706b\u3067\u9032\u3081\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["Python"],"title":"Python\u3067C\u8a00\u8a9e\u306e__LINE__\u3001__FILE__","version":"1.0","description":"C\u8a00\u8a9e\u306e__LINE__(\u8a18\u8ff0\u3057\u305f\u884c\u306e\u884c\u756a\u53f7)\u3001__FILE__(\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u540d)\u3068\u540c\u69d8\u306a\u3053\u3068Python\u3067\u3059\u308b\u306b\u306f\u3053\u308c\u3067\u53d6\u308c\u305d\u3046\u3002 3.11 inspect -- \u4f7f\u7528\u4e2d\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b http://www.python.jp/doc/release/lib/module-inspect.html import inspect c=inspect.currentframe() print 'line: ' + str(c.f_lineno) print 'filename: ' + c.f_code.co_filename","provider_name":"Hatena Blog"}