我有一个在 Py2.4 中运行的程序。我导入 TobiiPlugin.dll 文件,然后运行我的脚本。
import TobiiPlugin as tobii
tobii.setGazeSubjectProfile(3, 0)
但是,当我将代码移至 Py2.5 时,它对我很生气,我得到了
Traceback (most recent call last):
File "C:\tobiiDll\TobiiPlugin\Debug\logger_speech.py", line 274, in <module>
main()
File "C:\tobiiDll\TobiiPlugin\Debug\logger_speech.py", line 242, in main
tobii.setGazeSubjectProfile(3, 0)
File "C:\Python25\lib\ctypes\__init__.py", line 325, in __getattr__
func = self.__getitem__(name)
File "C:\Python25\lib\ctypes\__init__.py", line 330, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'setGazeSubjectProfile' not found
>>>
怎么一切都消失了?也不仅仅是这个功能。我从 DLL 中尝试了其他方法,但它们也没有工作。谢谢!