N0ury / dmm_util

dmm_util is a utility for interacting with Fluke 289 and 287 Series multimeters.
MIT License
15 stars 4 forks source link

syntax error #12

Closed tdjastrzebski closed 2 years ago

tdjastrzebski commented 2 years ago
File "dmm_util.py", line 93
    match len(name):
            ^
SyntaxError: invalid syntax
N0ury commented 2 years ago

What python version do you use? 3.10+ is needed. I use 3.10.2

tdjastrzebski commented 2 years ago

3.6.8 :/ - it may be a good idea to add some initial check and message I did not know they still improve Python syntax. I would refrain from using the lasted features in a tool like this, intended for broad audience, unless it is necessary. I am not certain but update will likely cause other scripts not to run. One of the main reasons I avoid Python is its poor backwards compatibility.

tdjastrzebski commented 2 years ago

I bet many electronics engines, even they have the latest and greatest Python version, do not know how to import "serial module". Probably after 5 minutes of Googling most most of will them will give up. I am still Googling.

N0ury commented 2 years ago

I have changed the README. It's not possible to add check, syntax one is done first. It would be necessary to add a wrapper. It's much simpler this way

tdjastrzebski commented 2 years ago

I did not mean syntax check but Python runtime version check.

N0ury commented 2 years ago

I have well understood, but this check is not possible. Python interpreter checks syntax first. It runs the script, and thus the test in a second time. It never gets to that stage.

tdjastrzebski commented 2 years ago

I see.