<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Troubles hosting ActivePython - Comments</title>
 <link>http://community.activestate.com/forum-topic/troubles-hosting-activepython</link>
 <description>Comments for &quot;Troubles hosting ActivePython&quot;</description>
 <language>en</language>
<item>
 <title>Troubles hosting ActivePython</title>
 <link>http://community.activestate.com/forum-topic/troubles-hosting-activepython</link>
 <description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I&#039;ve written an ActiveX Script Host in C++ so I can automate my application. I&#039;ve been testing some of ActiveX script languaages and I have seemed to run into a snag with ActivePython.&lt;/p&gt;
&lt;p&gt;When I create the host (engine), I add a named item to it (IActiveScript::AddNamedItem) which references one of my custom COM objects. When I do this when creating VBScript, JScript, PerlScript and RubyScript, I can call methods on my object. For example&lt;/p&gt;
&lt;p&gt;MyObj.MessageBox(&quot;Hello&quot;)&lt;/p&gt;
&lt;p&gt;But, when I create a Python-based engine, my engine&#039;s GetItemInfo (IActiveScriptSite::GetItemInfo) member is never called - which is odd since it works with all other engines. When I run the above code:&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;def Hello():&lt;br /&gt;
  msg = &#039;Hello from Python!&#039;&lt;br /&gt;
  MyObj.MessageBox(msg)&lt;/p&gt;
&lt;p&gt;Hello()&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;I get a the following error: &quot;TypeError: &#039;NoneType&#039; oject is not callable&quot;&lt;/p&gt;
&lt;p&gt;I am testing with ActivePython 2.4.3.11 for Windows (x86). I&#039;ve also &quot;registered&quot; ActivePython per the instructions in the online help - the ASP samples in the online help work.&lt;/p&gt;
&lt;p&gt;Any help here would be appreciated - I&#039;d like to support this engine.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/troubles-hosting-activepython#comments</comments>
 <category domain="http://community.activestate.com/forums/activepython-support-0">ActivePython Support</category>
 <category domain="http://community.activestate.com/os/windows-xp-pro">Windows XP Pro</category>
 <pubDate>Fri, 04 Apr 2008 18:37:59 +0100</pubDate>
 <dc:creator>dale_fugier</dc:creator>
 <guid isPermaLink="false">2160 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
