Menu

ctypes module for loading dll's

AlbertoB
2021-10-26
2021-10-26
  • AlbertoB

    AlbertoB - 2021-10-26

    Dear all,

    I have a dll written in C and I am trying to access it using the ironpython implementation on DWSIM. Whenever call the dll using the interactive IronPython Console it works perfectly. But when I try to import ctypes on the Script Manager of DWSIM it return the error: importError: No module named ctypes. Are the ironPython versions used in the console and script manager different?

    Best regards

    UPDATE:

    In order to load the standard library the following lines are needed:
    import sys
    sys.path.append(r"C:............\DWSIM6\Lib")
    import os
    import ctypes

     

    Last edit: AlbertoB 2021-10-28
    • Daniel Medeiros

      Daniel Medeiros - 2021-10-26

      they are the same, but I think that the standard library is not being loaded automatically in the script manager.