The I2C.sniffer function documentation raises a SyntaxWarning in more recent python versions (3.12 in this case), complaining about an invalid escape sequence '\ '.
This commit makes the string to be interpreted as raw instead.
Before:
$ python
Python 3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyBusPirateLite import I2C
.../pyBusPirateLite/pyBusPirateLite/I2C.py:160: SyntaxWarning: invalid escape sequence '\ '
""" Sniff traffic on an I2C bus.
After:
$ python
Python 3.12.2 (main, Feb 6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyBusPirateLite import I2C
The I2C.sniffer function documentation raises a
SyntaxWarning
in more recent python versions (3.12 in this case), complaining about aninvalid escape sequence '\ '
.This commit makes the string to be interpreted as raw instead.
Before:
After: