i have no problems using python 2.6 as a control program for RR, but some trouble switching to python 3.1:
changing the API lines:
...
raise RuntimeError, "socket connection broken"
...
print data
...
to:
...
raise RuntimeError("socket connection broken")
...
print (data)
...
allows in python 3.1:
from RR_API import *
RR=RR_API()
RR.Connect("localhost")
but:
RR.GetVariable("FPS")
leads to an error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Programme\Python\lib\site-packages\RR_API.py", line 114, in GetVariab
le
self.sock.send("<request><get_variable>"+str(name)+"</get_variable></request
>")
TypeError: must be bytes or buffer, not str
any python expert, who can help me?
regards
Joerg
|
|