Comments (5)
Yeah, I didn't make any effort towards backwards compatibility when I wrote
this. At the same time there isn't a ton of code. I'm happy to take a pull
request that adds py2k support, but it's not something I have any interest
in doing. Sorry.
On Sun, Sep 27, 2015 at 20:38 Michael Leonard [email protected]
wrote:
There is no mention of this in the README so I'm guessing it's unsupported
but I'm unable to get this package working in Python 2.7.10 (which I
unfortunately have to use).I installed through pip and initially had an import error where it was
failing to import enum so then I did a pip install enum and tried again
but the script is now failing with AttributError: 'module' object has no
attribute 'unique' in reference to the enum module.—
Reply to this email directly or view it on GitHub
#5.
from python-saleae.
Understandable, I wouldn't either if I didn't have to. With that said, it doesn't look like too difficult of a change to make. Would you be opposed to a pull request that converts the enums to dictionaries? A few of the other changes I came across are:
- A try-except block for the bytes() function, in Python 2.7 this function doesn't have the format argument and I believe it defaults to UTF-8 anyways.
- In the demo function, do an initial check of the Python version, if it is less than 3 set input = raw_input. In Python 2.7 the input function did something very different but the raw_input function behaves essentially the same.
from python-saleae.
On Tue, Sep 29, 2015 at 12:06 AM Michael Leonard [email protected]
wrote:
Understandable, I wouldn't either if I didn't have to. With that said, it
doesn't look like too difficult of a change to make. Would you be opposed
to a pull request that converts the enums to dictionaries?Don't feel strongly about this, but anything wrong with just adding a
dependency on the enum34 package? Less work for you.
http://stackoverflow.com/questions/36932/how-can-i-represent-an-enum-in-pythonA few of the other changes I came across are:
- A try-except block for the bytes() function, in Python 2.7 this
function doesn't have the format argument and I believe it defaults to
UTF-8 anyways.Sounds good
- In the demo function, do an initial check of the Python version, if
it is less than 3 set input = raw_input. In Python 2.7 the input function
did something very different but the raw_input function behaves essentially
the same.I've done that before w/out issue. Sounds good.
—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from python-saleae.
Good find on enum34, I had installed enum which would explain why it isn't working at all. I'll check that out.
from python-saleae.
ConnectionRefusedError
is still undefined in Python 2.7.
Not exactly a showstopper, but it can be misleading to newbies.
Edit: It's not a huge issue right now, but is the kind of thing that could cause headaches later. Anytime you have a try-except block that even attempts to catch a ConnectionRefusedError
this will raise a NameError instead and will mask whatever actually caused the ConnectionRefusedError to be raised.
I.e (in 2.7):
try:
raise TypeError
except ConnectionRefusedError:
raise ImportError
except TypeError:
print("Caught it")
finally:
print("Stop raising exceptions")
Gives:
Stop raising exceptions
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
NameError: name 'ConnectionRefusedError' is not defined
from python-saleae.
Related Issues (20)
- Add parameter to launch_logic allowing the caller to specify path HOT 4
- export_analyzer returns before csv file is completed HOT 3
- Random CommandNAKedError occurrence during "capture_to_file(log_file)" call HOT 3
- Implement get_sample_rate HOT 2
- erratic behavior after calling get_analyzer HOT 8
- enum34 should not be required above Python 3.4 HOT 2
- Path manipulation doesn't work when Logic is running on different OS than the Python module HOT 1
- get_analyzers raises IndexError HOT 4
- is_analyzer_complete raising self.CommandNAKedError when using custom analyzer HOT 1
- Windows str.replace not implemented properly HOT 3
- Implement several missing methods.
- get_capture_range throws ValueError HOT 1
- Export data to a python container HOT 2
- How to use this library with the new logic 2 HOT 1
- Is there a way to get ACK when the capture starts HOT 1
- AttributeError: partially initialized module 'saleae' has no attribute 'Saleae' (most likely due to a circular import) HOT 1
- Getting a type error while executing the launch_logic method HOT 1
- Saleae Init function doesn't take logic_path variable HOT 1
- Logic 2 Automation Interface - Feedback Request HOT 3
- Problem with export_data2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-saleae.