How to access dll from GAC

Posted by annu7uch on 2010-01-15 06:18

I installed Python (32 bit) on my win XP Pro (32 bit) system

I createed Pythhon extension "_hdtPython.pyd"

This extension makes calls to a .NET assembly, say a.dll, created by me. I have already deployed my a.dll in Global Assembly Cache (GAC)

How can I access it from ActivePython?

Here is the error message that I am getting currently

C:\Documents and Settings\anurags>python
ActivePython (ActiveState Software Inc.) based on
Python 2.6.4 (r264:75706, Nov 3 2009, 13:23:17) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import _hdtPython
>>> _hdtPython.get_number_nodes()

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'ScriptEngine, Version=, Culture=neutral, PublicKeyToken=331f52f67b41cab5' or one of its dependencies. The system
cannot find the file specified.
File name: 'ScriptEngine, Version=, Culture=neutral, PublicKeyToken=331f52f67b41cab5' at DebugOperationWrapper.{ctor}(DebugOperationWrapper* )

=== Pre-bind state information ===
LOG: DisplayName = ScriptEngine, Version=, Culture=neutral, PublicKeyToken=331f52f67b41cab5
LOG: Appbase = file:///C:/Python26/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: ScriptEngine, Version=, Culture=neutral, PublicKeyToken=331f5
LOG: Attempting download of new URL file:///C:/Python26/ScriptEngine.DLL.
LOG: Attempting download of new URL file:///C:/Python26/ScriptEngine/ScriptEngine.DLL.
LOG: Attempting download of new URL file:///C:/Python26/ScriptEngine.EXE.
LOG: Attempting download of new URL file:///C:/Python26/ScriptEngine/ScriptEngine.EXE.

C:\Documents and Settings\anurags>