使用python:SETPATHd访问Refprop

2024-06-02 08:56:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试通过python访问NIST refprop数据库。为此,我从http://www.boulder.nist.gov/div838/theory/refprop/Frequently_asked_questions.htm下载了refprop python模块

尝试导入模块时,收到以下错误:

>>> import REFPROP
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python33\lib\REFPROP.py", line 6525, in <module>
   setpath()
File "C:\Python33\lib\REFPROP.py", line 381, in setpath
   _setpath(path)
File "C:\Python33\lib\REFPROP.py", line 421, in _setpath
   _rp.SETPATHdll(ctypes.byref(_hpth), ctypes.c_long(255))
File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
   func = self.__getitem__(name)
File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
   func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'SETPATHdll' not found 
>>>

我发现这个SETPATHdll函数不包含在参考属性.dll文件。不过,这个模块是为这个文件编写的。有人能帮忙吗? 谢谢您。在


Tags: 模块inpyselfinitliblinectypes