<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I'm trying to access a custom .NET Assembly with Python .NET, but can't
get it to recognise the Assembly name space. IronPython works fine in
the code below. Any clues? I'm using the Python .NET build from here: <span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;"><a
 href="http://sourceforge.net/project/showfiles.php?group_id=162464">http://sourceforge.net/project/showfiles.php?group_id=162464</a><br>
<br>
<br>
-------------------------<br>
import sys<br>
GLOBAL_IRONPython = "Iron" in sys.version<br>
<br>
# Need full path (or could add the path to sys.path)<br>
FDO_DLL_PATH = "c:\\program files\\sil\\fieldworks\\FDO.dll"<br>
<br>
import clr<br>
<br>
if GLOBAL_IRONPython:<br>
    print "IRON Python Startup"<br>
    clr.AddReferenceToFileAndPath(FDO_DLL_PATH)<br>
else:<br>
    # Python .NET <br>
    print "Python .NET Startup"<br>
    from System.Reflection import Assembly <br>
    fdo = Assembly.LoadFile(FDO_DLL_PATH)<br>
    <br>
# This is failing in Python .NET  -- "No module named </span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">SIL.FieldWorks.FDO"</span><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">!    <br>
from SIL.FieldWorks.FDO import FdoCache      <br>
<br>
db = FdoCache.Create("DB-name")       <br>
print db.ServerName, db.DatabaseName<br>
</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;">-------------------------<br>
<br>
I've also tried clr.AddReference("SIL.FieldWorks.FDO"), but that
reports "Unable to find assembly 'SIL.Fieldworks.FDO'."<br>
<br>
Thanks,<br>
<br>
Craig.<br>
<br>
</span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;;"><br>
<br>
<br>
<br>
</span>
</body>
</html>