<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>digital matter &#187; Python</title>
	<atom:link href="http://blog.loadlimits.info/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.loadlimits.info</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 31 Aug 2010 21:25:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pythonのwin32comからSilverlightを使おうと試みる</title>
		<link>http://blog.loadlimits.info/2009/10/python%e3%81%aewin32com%e3%81%8b%e3%82%89silverlight%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%86%e3%81%a8%e8%a9%a6%e3%81%bf%e3%82%8b/</link>
		<comments>http://blog.loadlimits.info/2009/10/python%e3%81%aewin32com%e3%81%8b%e3%82%89silverlight%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%86%e3%81%a8%e8%a9%a6%e3%81%bf%e3%82%8b/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 06:56:25 +0000</pubDate>
		<dc:creator>hotpi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[疑問]]></category>
		<category><![CDATA[ActiveX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.loadlimits.info/2009/10/python%e3%81%aewin32com%e3%81%8b%e3%82%89silverlight%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%86%e3%81%a8%e8%a9%a6%e3%81%bf%e3%82%8b/</guid>
		<description><![CDATA[最終的にはPythonで書かれたWindowsアプリケーションで、Silverlightのコンテンツをロードしたいという目的なのですが、とりあえずSilverlightのActiveXコントロールを読み込んで動作を確認してみたいので色々実験。
まず、インストールされているSilverlightのバージョンを調べてみる。
Javascriptで書かれたコードがいくつか見つかったのでそれを書き直す。
以下はJS版。


var control = new ActiveXObject('AgControl.AgControl');
alert(control.IsVersionSupported('3.0'));


これをPythonで書いてみる。

import win32com.client
control = win32com.client.Dispatch("AgControl.AgControl")
print control.IsVersionSupported('3.0')

Silverlight 3がインストールされていればTrueが表示されます。
他にどんなメソッドが定義されているのかを調べるために、Visual StudioからAgControlを参照して、オブジェクトブラウザで調査。
というか、Silverlightのプラグインのリファレンスがあった。
Silverlight プラグインのオブジェクト リファレンス
が…Sourceを指定してもIsLoadedプロパティがTrueにならない…うーん…もう少し調べてみる。
]]></description>
			<content:encoded><![CDATA[<p>最終的にはPythonで書かれたWindowsアプリケーションで、Silverlightのコンテンツをロードしたいという目的なのですが、とりあえずSilverlightのActiveXコントロールを読み込んで動作を確認してみたいので色々実験。</p>
<p>まず、インストールされているSilverlightのバージョンを調べてみる。</p>
<p>Javascriptで書かれたコードがいくつか見つかったのでそれを書き直す。</p>
<p>以下はJS版。</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:1fad3344-c133-4716-b122-991f00b3f96e" class="wlWriterEditableSmartContent">
<pre name="code" class="js">var control = new ActiveXObject('AgControl.AgControl');
alert(control.IsVersionSupported('3.0'));
</pre>
</div>
<p>これをPythonで書いてみる。</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:2ef33f5a-557a-48de-85a2-d2d00e450645" class="wlWriterEditableSmartContent">
<pre name="code" class="py">import win32com.client
control = win32com.client.Dispatch("AgControl.AgControl")
print control.IsVersionSupported('3.0')</pre>
</div>
<p>Silverlight 3がインストールされていればTrueが表示されます。</p>
<p>他にどんなメソッドが定義されているのかを調べるために、Visual StudioからAgControlを参照して、オブジェクトブラウザで調査。</p>
<p>というか、Silverlightのプラグインのリファレンスがあった。</p>
<p><a href="http://msdn.microsoft.com/ja-jp/library/cc838259(VS.95).aspx" target="_blank">Silverlight プラグインのオブジェクト リファレンス</a></p>
<p>が…Sourceを指定してもIsLoadedプロパティがTrueにならない…うーん…もう少し調べてみる。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadlimits.info/2009/10/python%e3%81%aewin32com%e3%81%8b%e3%82%89silverlight%e3%82%92%e4%bd%bf%e3%81%8a%e3%81%86%e3%81%a8%e8%a9%a6%e3%81%bf%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
