You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bitio uses code to detect whether it has loaded the pyserial embedded in the project, or whether sys pathing has meant that it found a (possibly incompatible and buggy) system installed one. Ubuntu 12 for example has a slightly buggy version of pyserial installed by default, which is why we package pyserial inside bitio to avoid this being used.
However, currently bitio looks for existence of a hacked-in 'BITIO' module attribute added to pyserial - this works nicely, but makes it slightly harder for people to update their embedded pyserial package without breaking this.
I had an idea that we could check the sys.modules["bitio"].__file__ attribute to find out which path was actually used to import the module (inside the outer package), and checking the basename of the path could tell us if it actually found the system installed one or the embedded one. This would make the pyserial embedded inside bitio completely unchanged from the original source.
The text was updated successfully, but these errors were encountered:
bitio uses code to detect whether it has loaded the pyserial embedded in the project, or whether sys pathing has meant that it found a (possibly incompatible and buggy) system installed one. Ubuntu 12 for example has a slightly buggy version of pyserial installed by default, which is why we package pyserial inside bitio to avoid this being used.
However, currently bitio looks for existence of a hacked-in 'BITIO' module attribute added to pyserial - this works nicely, but makes it slightly harder for people to update their embedded pyserial package without breaking this.
I had an idea that we could check the
sys.modules["bitio"].__file__
attribute to find out which path was actually used to import the module (inside the outer package), and checking the basename of the path could tell us if it actually found the system installed one or the embedded one. This would make the pyserial embedded inside bitio completely unchanged from the original source.The text was updated successfully, but these errors were encountered: