Comment #7 on issue 39 by
qoqi.lei...@gmail.com: python 3 support
https://code.google.com/p/pylibnidaqmx/issues/detail?id=39
I had to make some minor changes to the code. The most significant change
is the deprecation of namedtuples to customtuple. Functions in python3 are
restricted to have less than 256 arguments. The namedtuple class does not
work in that case.
In the patch file that I attached, are some changes I did before running
2to3. Afterwards, I had to change 1 extra line:
libnidaqmx.py:264:
new_args.append (bytes(a, encoding='utf-8'))
There might be a better way to circumvent this, in python 3, strings are
unicode by default.
Furthermore, all _h_*_*.py files should be regenerated, or just deleted
from the repository.
Attachments:
customtuple.py 1.1 KB
libnidaqmx.py.patch 1.7 KB