import_dotnet.py 953 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import logging
import os
import sys
from settings import PACKAGE_ROOT

#------------------------------------------------------------------------------
# prepare environment for loading latino (Python.net interpreter should be used)
# see: http://pythonnet.sourceforge.net/
#------------------------------------------------------------------------------

dllPath = os.path.join(PACKAGE_ROOT, 'bin')
sys.path.append(dllPath)

try:
    import System
    #import CrossBee
    from CrossBeeInterfaces import *
18
    import CrossBeeInterfaces
19 20 21 22 23 24 25
    #from System.Reflection import Assembly
    #Assembly.LoadFile(os.path.join(dllPath, 'CrossBeePrebuilt.dll'))
except Exception:
    logging.warning("DotNet assemblies could not be loaded! Probable reasons: missing dlls or wrong interpreter (see http://pythonnet.sourceforge.net). "
                    "Other functionality of ClowdFlows (besides .Net assemblies) should be OK!")
    pass