Preconditions:
- ubuntu 20.04 and kernel 5.11.0-36
- linux-gpib-4.3.4
- build and install python language support : make && make install
- Python 3.8.10 - used
Python test code:
----8<----8<----8<----8<----8<----8<
import gpib
board_address = 0
gpib_device_address = 6
con=gpib.dev(board_address, gpib_device_address)
gpib.write(con, b'*IDN?')
print(gpib.read(con,1000))
gpib.close(con)
----8<----8<----8<----8<----8<----8<
Actual warning when gpib-library is used:
"DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats"
Changes needed to:
../linux-gpib-4.3.4/linux-gpib-user-4.3.4/language/python/gpibinter.c
Tested fix proposal in attached patch file.
Your patch has been applied to the svn. Thank you.
Not being a pythoneer perhaps someone can suggest a fix for the DeprecationWarning below from a build with python3.10.
cheers,
-dave
Hi,
You can try to replace the original line from setup.py with:
distutils is deprecated and setuptools should be used insted.
Last edit: mika 2021-10-26
Thanks mika, this worked. Pushed to svn.