Hi, I'd like to use PythonNet to script some .NET assemblies we have. Must I place these into the GAC? I've tried to put the python script into the same directory as the assembly DLL but this doesn't work: C:\dev\python\PythonNetTest\bin\Debug>python Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import CLR import CLR.PythonNetTest Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named PythonNetTest import CLR.PythonNetTest.MyTest Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named PythonNetTest
TIA, Felix. _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
I'd like to use PythonNet to script some .NET assemblies we have. Must I place these into the GAC? I've tried to put the python script into the same directory as the assembly DLL but this doesn't work:
Hi Felix - Right now to import an assembly it either needs to be in the GAC or in the "application directory" or a subdirectory thereof. When running python, the application directory is the directory where python.exe lives, not the place where the script you are running lives. One of the things I want to do for the final is see if there is a way to have the assembly loader use the python path (sys.path) when looking for assemblies. Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com
participants (2)
-
Brian Lloyd
-
Felix McAllister