{"id":1447,"date":"2008-10-28T22:40:00","date_gmt":"2008-10-28T13:40:00","guid":{"rendered":"https:\/\/hdmr.org\/d\/?e=168"},"modified":"2008-10-28T22:40:00","modified_gmt":"2008-10-28T13:40:00","slug":"blogn-168","status":"publish","type":"post","link":"https:\/\/hdmr.org\/d\/?e=168","title":{"rendered":"Python\u5f0f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306f\u4fbf\u5229"},"content":{"rendered":"<p>\u6700\u8fd1IronPython\u3067\u3082\u306e\u3065\u304f\u308a\u306b\u52b1\u3093\u3067\u308b\u308f\u3051\u3060\u304c\u3001<br \/>\u307e\u3041\u3053\u3046\u3044\u3046\u306e\u3084\u3063\u3066\u308b\u3068LL\u306b\u304a\u3051\u308b\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u304c\u308f\u304b\u3063\u3066\u304f\u308b\u3002<br \/>LL\u3068\u3044\u3046\u306e\u306f\u3001\u8efd\u91cf\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u610f\u5473\u306d\u3002<br \/>\u305f\u3060\u5024\u306e\u675f\u304c\u307b\u3057\u3051\u308c\u3070\u3001\u30ea\u30b9\u30c8\u3068\u304b\u30bf\u30d7\u30eb\u3068\u304b\u8f9e\u66f8\u3068\u304b\u4f7f\u3048\u3070OK\u306a\u306e\u3088\u306d\u3002<br \/>\u3051\u3069\u3001\u5927\u91cf\u306e\u5024\u306e\u675f\u3070\u3063\u304b\u308a\u3042\u3063\u3066\u3082\u56f0\u308b\u3068\u304d\u304c\u3042\u308b\u3068\u3002<br \/>\u305d\u3046\u3044\u3046\u3068\u304d\u4fbf\u5229\u3067\u3059\u306d\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>Perl\u3067\u306f\u3042\u3093\u307e\u308a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u4f7f\u3044\u3084\u3059\u304f\u306a\u3044\u304b\u3089\u4f7f\u3063\u3066\u306a\u304b\u3063\u305f\u304c\u3001<br \/>Python\u306f\u3059\u3054\u304f\u7c21\u5358\u3002\u3060\u304b\u3089\u5927\u91cf\u751f\u7523\u3057\u305f\u304f\u306a\u308b\u3002<\/p>\n<hr \/>\n<p>IronPython\u3067Windows\u30d5\u30a9\u30fc\u30e0\u306e\u958b\u767a\u3092\u3057\u3066\u308b\u306e\u3060\u304c\u3001<br \/>A\u3068\u3044\u3046\u30dc\u30bf\u30f3\u306e\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306bB\u3068\u3044\u3046\u30a6\u30a4\u30f3\u30c9\u30a6\u3092\u958b\u304f\u3001<br \/>C\u3068\u3044\u3046\u30dc\u30bf\u30f3\u306e\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306bD\u3068\u3044\u3046\u30a6\u30a4\u30f3\u30c9\u30a6\u3092\u958b\u304f\u2026<br \/>\u3068\u3044\u3046\u306e\u3092\u5ef6\u3005\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u306f\u7121\u7406\u3002<br \/>\u3053\u308c\u306b\u306f2\u3064\u8003\u3048\u304c\u3042\u3063\u3066\u3001\u30dc\u30bf\u30f3\u306b\u958b\u304f\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u767b\u9332\u3057\u3066\u304a\u3044\u3066\u3001<br \/>\u305d\u306e\u30dc\u30bf\u30f3\u306e\u30af\u30ea\u30c3\u30af\u306b\u3064\u3044\u3066\u3001\u5168\u90e8\u306b\u767b\u9332\u3055\u308c\u305f\u30a6\u30a4\u30f3\u30c9\u30a6\u3092\u958b\u304f\u3068\u3057\u3066\u304a\u304f\u3002<br \/>\u3082\u30461\u3064\u306f\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u3063\u3066\u3001\u305d\u308c\u3092\u958b\u304f\u3068\u3044\u3046\u52d5\u4f5c\u30921\u30641\u3064\u767b\u9332\u3059\u308b\u3002<br \/>\u3053\u3046\u3059\u308c\u3070\u3055\u3063\u304d\u306e\u3088\u3046\u306a\u3068\u3093\u3067\u3082\u306a\u3044\u3053\u3068\u306b\u306a\u3089\u306a\u304f\u3066\u6e08\u3080\u3002<br \/>\u307e\u3041\u3053\u308c\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30dc\u30bf\u30f3\u304b\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30af\u30e9\u30b9\u3092\u7d99\u627f\u305b\u306a\u3044\u304b\u3093\u304b\u3089\u3081\u3093\u3069\u304f\u3055\u3044\u3051\u3069\u306d\u3002<br \/>\u3057\u304b\u3057Python\u3067\u306f\u305d\u306e\u7a0b\u5ea6\u306a\u3089\u6570\u884c\u3067\u66f8\u3051\u308b\u3002<\/p>\n<pre>class opentest(System.Windows.Forms.Form):<br \/>  def __init__(self,id):<br \/>    self.Text=\"ID:%d\"%id<br \/>  def open(self,sender,e):<br \/>    self.ShowDialog()<\/pre>\n<p>\u307e\u3041\u5b9f\u969b\u306e\u306f\u3001\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u3042\u308b__init__\u3067\u30d5\u30a9\u30fc\u30e0\u306e\u5f62\u72b6\u3068\u304b\u8a73\u3057\u304f\u5b9a\u7fa9\u3057\u3066\u308b\u3051\u3069\u3001<br \/>\u3055\u3063\u304d\u3044\u3044\u305f\u304b\u3063\u305f\u3053\u3068\u306f\u3053\u308c\u3067\u5b9f\u73fe\u3067\u304d\u3066\u307e\u3059\u306d\u3002<br \/>\u3068\u3053\u308d\u3067\u3001\u4f55\u3082\u7d99\u627f\u3057\u306a\u3044\u3067\u30af\u30e9\u30b9\u4f5c\u308b\u3068\u304d\u306f\u3069\u3046\u3059\u308b\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\u7b54\u3048\u306f class foo(object): \u3068\u66f8\u304f\u3002\u8a73\u3057\u304f\u77e5\u3089\u3093\u306e\u3060\u304cobject\u304c\u306a\u3044\u3068\u610f\u5473\u304c\u5909\u308f\u3063\u3066\u304f\u308b\u3089\u3057\u3044\u3002<br \/>\u3053\u308c\u3067\u3001\u3053\u3046\u3044\u3046\u98a8\u306b\u3059\u308c\u3070\u3044\u3044\u3068\u3002<\/p>\n<pre>myrnd=System.Random()<br \/>for x in range(10):<br \/>  for y in range(10):<br \/>    button=System.Windows.Forms.Button()<br \/>    button.Size=System.Drawing.Size(20,20)<br \/>    button.Location=System.Drawing.Point(20*x,20*y)<br \/>    button.Click+=opentest(myrnd.Next(100)).open<br \/>    form.Controls.Add(button)<\/pre>\n<p>\u672c\u5f53\u306fPython\u306erandom\u3067\u3084\u308a\u305f\u304b\u3063\u305f\u304c\u3001\u3046\u307e\u304f\u3044\u304b\u3093\u306e\u3067.NET\u306e\u3067\u3002<br \/>\u3053\u3093\u306a\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u3067\u3044\u3051\u308b\u3093\u3067\u3059\u306d\u3002<\/p>\n<hr \/>\n<p>\u307e\u3041\u3044\u308d\u3044\u308d\u306a\u4f7f\u3044\u9053\u304c\u3042\u308b\u3060\u308d\u3046\u304c\u3001<br \/>\u306a\u304b\u306a\u304b\u6163\u308c\u306a\u3044\u306e\u3067\u3001\u305d\u3053\u307e\u3067\u6d3b\u7528\u3067\u304d\u3066\u308b\u308f\u3051\u3067\u3082\u306a\u3044\u3002<br \/>\u8003\u3048\u308b\u6687\u304c\u3042\u308c\u3070\u3001\u30d9\u30bf\u66f8\u304d\u3067\u3082\u30bd\u30fc\u30b9\u66f8\u304f\u304b\u3089\u306d\u3002<br \/>\u305d\u3053\u304b\u3089\u767a\u898b\u3059\u308b\u3082\u306e\u3082\u3042\u308b\u3068\u3002<br \/>\u307e\u305a\u306f\u3001WIndows\u30d5\u30a9\u30fc\u30e0\u306e\u30a4\u30d9\u30f3\u30c8\u5468\u8fba\u3067\u6d3b\u7528\u3057\u3066\u307f\u3066\u307e\u3059\u3002<br \/>\u3053\u3044\u3064\u306f\u3055\u3063\u304d\u8a00\u3063\u305f\u4e8b\u60c5\u3067\u30d9\u30bf\u66f8\u304d\u304c\u307b\u3068\u3093\u3069\u901a\u7528\u3057\u306a\u3044\u306e\u3067\u2026<br \/>\u305d\u3046\u3084\u3063\u3066\u3084\u3063\u3066\u3044\u304f\u3068\u3001\u3053\u308c\u306f\u4fbf\u5229\u305d\u3046\u3060\u3068\u601d\u3048\u3066\u304d\u305f\u3082\u306e\u3067\u3059\u3002<br \/>\u307e\u3041\u9a19\u3055\u308c\u305f\u3068\u601d\u3063\u3066\u3084\u3063\u3066\u307f\u308c\u3070\u3088\u308d\u3057\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1IronPython\u3067\u3082\u306e\u3065\u304f\u308a\u306b\u52b1\u3093\u3067\u308b\u308f\u3051\u3060\u304c\u3001\u307e\u3041\u3053\u3046\u3044\u3046\u306e\u3084\u3063\u3066\u308b\u3068LL\u306b\u304a\u3051\u308b\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u304c\u308f\u304b\u3063\u3066\u304f\u308b\u3002LL\u3068\u3044\u3046\u306e\u306f\u3001\u8efd\u91cf\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u306e\u610f\u5473\u306d\u3002\u305f\u3060\u5024\u306e\u675f\u304c\u307b\u3057\u3051\u308c\u3070\u3001\u30ea\u30b9\u30c8\u3068\u304b\u30bf\u30d7\u30eb\u3068\u304b\u8f9e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1447","post","type-post","status-publish","format-standard","hentry","category-computer"],"_links":{"self":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/1447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1447"}],"version-history":[{"count":0,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/1447\/revisions"}],"wp:attachment":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}