<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Forcing dynamic dispatching in Python&#8217;&#8217;s win32com</title>
	<atom:link href="http://www.xsi-blog.com/archives/24/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xsi-blog.com/archives/24</link>
	<description>People and thoughts behind XSI in production...</description>
	<pubDate>Tue, 06 Jan 2009 21:38:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Jason Dexter</title>
		<link>http://www.xsi-blog.com/archives/24#comment-93</link>
		<dc:creator>Jason Dexter</dc:creator>
		<pubDate>Sat, 02 Jul 2005 05:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-93</guid>
		<description>Hello Patrick

I''m still a novice with Python and have been looking over the BuzzLibrary that Buzz and you were kind enough to share.  I am having troubles with getting the plugins (Selection for Camera specifically) to work.  Could you clarify specifically what you mean by:

- Modify Python’s win32com.client __init__.py file

I was looking at the ___init__py file you provided in the latest buzz version, but it has no code in it to refer to.

Anyway, thanks again.</description>
		<content:encoded><![CDATA[<p>Hello Patrick</p>
<p>I&#8221;m still a novice with Python and have been looking over the BuzzLibrary that Buzz and you were kind enough to share.  I am having troubles with getting the plugins (Selection for Camera specifically) to work.  Could you clarify specifically what you mean by:</p>
<p>- Modify Python’s win32com.client __init__.py file</p>
<p>I was looking at the ___init__py file you provided in the latest buzz version, but it has no code in it to refer to.</p>
<p>Anyway, thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Boucher</title>
		<link>http://www.xsi-blog.com/archives/24#comment-67</link>
		<dc:creator>Patrick Boucher</dc:creator>
		<pubDate>Wed, 18 May 2005 03:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-67</guid>
		<description>I have seen this and to be quite honest, I''m not absolutely certain where it comes from. What is obvious is that it''s having a hard time with anything that comes from the ''c'' variable which is a shortcut to win32com.client''s constants, i.e. XSI''s constants.

I have noticed that on systems where I fresh install Python and XSI, if I force dynamic dispatching in Python (the procedure described in this article) before I start XSI, I will get this error on several of my plug-ins that access XSI/win32com constants. To fix, XSI must be started while the Python module is stock and unmodified. Then, when win32com.client''s __init__.py file is modified, you have a working Python in XSI with forced dynamic dipatches and accessible constants.

To recap:
- Fresh XSI and Python
- Start XSI, something gets registered in Python or the system, I''m not positive what. Magic happens.
- Shutdown XSI
- Modify Python''s win32com.client __init__.py file
- Restart XSI and keep your fingers crossed.

As I said. I''m not certain... well... I don''t know why this happens so metimes. Happened on 3 of the 23 systems I administer: XSI 4.2 / ActivePython 2.4.

This procedure is just a hack to circumvent the fact that sometimes XSI doesn''t return a properly dispatched object. Hopefully with Python''s growing popularity in the XSI community and with people like Jerry Gamache and the Softimage crew on the case, Python in XSI will only get better and more stable as versions go on.</description>
		<content:encoded><![CDATA[<p>I have seen this and to be quite honest, I&#8221;m not absolutely certain where it comes from. What is obvious is that it&#8217;&#8217;s having a hard time with anything that comes from the &#8221;c&#8221; variable which is a shortcut to win32com.client&#8217;&#8217;s constants, i.e. XSI&#8217;&#8217;s constants.</p>
<p>I have noticed that on systems where I fresh install Python and XSI, if I force dynamic dispatching in Python (the procedure described in this article) before I start XSI, I will get this error on several of my plug-ins that access XSI/win32com constants. To fix, XSI must be started while the Python module is stock and unmodified. Then, when win32com.client&#8217;&#8217;s __init__.py file is modified, you have a working Python in XSI with forced dynamic dipatches and accessible constants.</p>
<p>To recap:<br />
- Fresh XSI and Python<br />
- Start XSI, something gets registered in Python or the system, I&#8221;m not positive what. Magic happens.<br />
- Shutdown XSI<br />
- Modify Python&#8217;&#8217;s win32com.client __init__.py file<br />
- Restart XSI and keep your fingers crossed.</p>
<p>As I said. I&#8221;m not certain&#8230; well&#8230; I don&#8221;t know why this happens so metimes. Happened on 3 of the 23 systems I administer: XSI 4.2 / ActivePython 2.4.</p>
<p>This procedure is just a hack to circumvent the fact that sometimes XSI doesn&#8221;t return a properly dispatched object. Hopefully with Python&#8217;&#8217;s growing popularity in the XSI community and with people like Jerry Gamache and the Softimage crew on the case, Python in XSI will only get better and more stable as versions go on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: biju</title>
		<link>http://www.xsi-blog.com/archives/24#comment-66</link>
		<dc:creator>biju</dc:creator>
		<pubDate>Tue, 17 May 2005 16:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-66</guid>
		<description>Any idea why I get the following error - i guess its not able to find siMenuTbAnimateCreateParameterID

#ERROR : Traceback (innermost last):
#  File "", line 18, in XSILoadPlugin
#    in_reg.RegisterMenu(c.siMenuTbAnimateCreateParameterID, "PB_JitterMenu", False)
#  File "C:\Python22\Lib\site-packages\win32com\client\__init__.py", line 131, in __getattr__
#    raise AttributeError, a
#AttributeError: siMenuTbAnimateCreateParameterID
# - [line 130]
#ERROR : 2262 - This plug-in could not be loaded:
#
#

Thanks

Biju</description>
		<content:encoded><![CDATA[<p>Any idea why I get the following error - i guess its not able to find siMenuTbAnimateCreateParameterID</p>
<p>#ERROR : Traceback (innermost last):<br />
#  File &#8220;&#8221;, line 18, in XSILoadPlugin<br />
#    in_reg.RegisterMenu(c.siMenuTbAnimateCreateParameterID, &#8220;PB_JitterMenu&#8221;, False)<br />
#  File &#8220;C:\Python22\Lib\site-packages\win32com\client\__init__.py&#8221;, line 131, in __getattr__<br />
#    raise AttributeError, a<br />
#AttributeError: siMenuTbAnimateCreateParameterID<br />
# - [line 130]<br />
#ERROR : 2262 - This plug-in could not be loaded:<br />
#<br />
#</p>
<p>Thanks</p>
<p>Biju</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brad</title>
		<link>http://www.xsi-blog.com/archives/24#comment-64</link>
		<dc:creator>brad</dc:creator>
		<pubDate>Fri, 13 May 2005 14:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-64</guid>
		<description>Everything works great now, thank you!</description>
		<content:encoded><![CDATA[<p>Everything works great now, thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Boucher</title>
		<link>http://www.xsi-blog.com/archives/24#comment-63</link>
		<dc:creator>Patrick Boucher</dc:creator>
		<pubDate>Thu, 12 May 2005 22:22:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-63</guid>
		<description>Wait... I think I forgot a file when I packaged the library... Doh! Try redownloading it!
Sorry about that!</description>
		<content:encoded><![CDATA[<p>Wait&#8230; I think I forgot a file when I packaged the library&#8230; Doh! Try redownloading it!<br />
Sorry about that!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Boucher</title>
		<link>http://www.xsi-blog.com/archives/24#comment-62</link>
		<dc:creator>Patrick Boucher</dc:creator>
		<pubDate>Thu, 12 May 2005 22:04:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-62</guid>
		<description>At first glance it seems to be the operator is not finding the buzz library.

You need to install the buzz library from a few posts back. That means putting it somewhere on your drive and adjusting your PYTHONPATH environment variable to include the path where you uncompressed the library. You can alternatively uncompress the library in C:\Pythonxx\Lib\site-packages.

To see if python and the buzz library are properly installed you can just run the following few lines in the script editor (python language of course):

from buzz.xsi import *
import buzz.cg.noise as noise
log(noise.noise(15))

should output:

#INFO : 0.718757729046</description>
		<content:encoded><![CDATA[<p>At first glance it seems to be the operator is not finding the buzz library.</p>
<p>You need to install the buzz library from a few posts back. That means putting it somewhere on your drive and adjusting your PYTHONPATH environment variable to include the path where you uncompressed the library. You can alternatively uncompress the library in C:\Pythonxx\Lib\site-packages.</p>
<p>To see if python and the buzz library are properly installed you can just run the following few lines in the script editor (python language of course):</p>
<p>from buzz.xsi import *<br />
import buzz.cg.noise as noise<br />
log(noise.noise(15))</p>
<p>should output:</p>
<p>#INFO : 0.718757729046</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brad</title>
		<link>http://www.xsi-blog.com/archives/24#comment-61</link>
		<dc:creator>brad</dc:creator>
		<pubDate>Thu, 12 May 2005 21:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.xsi-blog.com/?p=24#comment-61</guid>
		<description>Hey, this seems to help to a certain extent, but I now periodically get the following error:

''ERROR : Traceback (most recent call last):
''  File "", line 2, in ?
''    import buzz.cg.noise as noise
''  File "C:\Python23\Lib\buzz\cg\__init__.py", line 1, in ?
''    from file import *
''ImportError: No module named file
'' - [line 2 in C:\Softimage\XSI_4.2\Application\Plugins\PB_JitterOp.py]
''ERROR : 2000 - Error loading script file: ''C:\Softimage\XSI_4.2\Application\Plugins\PB_JitterOp.py''. Operator ''cube.cube.PB_JitterOp'' will no longer be evaluated.
''Debugging interfaces not available - debugging is disabled..

Is this a related problem?</description>
		<content:encoded><![CDATA[<p>Hey, this seems to help to a certain extent, but I now periodically get the following error:</p>
<p>&#8221;ERROR : Traceback (most recent call last):<br />
&#8221;  File &#8220;&#8221;, line 2, in ?<br />
&#8221;    import buzz.cg.noise as noise<br />
&#8221;  File &#8220;C:\Python23\Lib\buzz\cg\__init__.py&#8221;, line 1, in ?<br />
&#8221;    from file import *<br />
&#8221;ImportError: No module named file<br />
&#8221; - [line 2 in C:\Softimage\XSI_4.2\Application\Plugins\PB_JitterOp.py]<br />
&#8221;ERROR : 2000 - Error loading script file: &#8221;C:\Softimage\XSI_4.2\Application\Plugins\PB_JitterOp.py&#8221;. Operator &#8221;cube.cube.PB_JitterOp&#8221; will no longer be evaluated.<br />
&#8221;Debugging interfaces not available - debugging is disabled..</p>
<p>Is this a related problem?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
