How to access dll from GAC

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

Hi
I installed Python 2.6.4.8 (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 2.6.4.8 (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=1.3.120.20398, Culture=neutral, PublicKeyToken=331f52f67b41cab5' or one of its dependencies. The system
cannot find the file specified.
File name: 'ScriptEngine, Version=1.3.120.20398, Culture=neutral, PublicKeyToken=331f52f67b41cab5' at DebugOperationWrapper.{ctor}(DebugOperationWrapper* )

=== Pre-bind state information ===
LOG: DisplayName = ScriptEngine, Version=1.3.120.20398, Culture=neutral, PublicKeyToken=331f52f67b41cab5
(Fully-specified)
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=1.3.120.20398, Culture=neutral, PublicKeyToken=331f5
2f67b41cab5
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>