Closed manuelgodoy closed 8 years ago
Actually I just noticed your code is for Python 3. Do you plan to make it compatible with Python 2.7?
Someone else had an issue a little while back and I added some things that were able to fix Python2 support, see #5. I'm happy to merge in fixes for Py2k, but don't have the time to develop it myself.
Unfortunately, this isn't the easiest thing to add automated testing to since it requires an external program to be running.
Any particular reason you're still using Py2k? It is deprecated...
I did just test this locally with Python 2.7.11 and the demo seems to work fine.
Are you sure your installation is up to date, https://github.com/ppannuto/python-saleae/blob/master/saleae/saleae.py#L9 should fix this issue
Python 2.7.11 (default, Jan 11 2016, 00:48:43)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> type(bytes)
<type 'type'>
>>> bytes == str
True
>>> from builtins import bytes
>>> bytes == str
False
>>> type(bytes)
<class 'future.types.newbytes.BaseNewBytes'>
@ppannuto thanks for your replies. I am using Python 2.7 because many libraries use it and a many of my current projects were built in it. I decided to work with a virtual environment to use Python 3 and saleae.py. In any case my demo() never worked with Python 2.7 but I am not going to troubleshoot that any time soon.
I am trying to run the demo and I get the following error