我有一个在Py2.4中运行peachy的程序。我导入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中的其他人,他们也没有工作。谢谢!