Someone here, probably Wes, thought me embarrassing lesson: http://lmgtfy.com/?q=python+crash+course
Put one/two day into learning basic python data types and syntax. It will be worth it, I guarantee it. T On Jan 15, 2018 6:57 PM, "Denis Heidtmann" <denis.heidtm...@gmail.com> wrote: > Well, I have solved the issue of "mult=self.units.strip()+' '[0]: > TypeError: can't concat bytes to int". It needs parentheses, which the > original code had. Now the code runs, but, alas, now it does not report > the readings from the meter. Since I really do not understand > object-oriented python, I am at a loss. It seems to me that this format is > inadequate and inappropriate for schooling a coding novice on such things, > so I will see what I help I can get in person. Thanks for all who have had > to suffer through this. > > -Denis > > On Sun, Jan 14, 2018 at 6:30 PM, Denis Heidtmann < > denis.heidtm...@gmail.com> > wrote: > > > Last discussion on this issue I mentioned a python program I found. I > > have since put the program in Spyder using Python3. I had to make a > number > > of changes to accommodate the change to 3. The latest is that I see that > > the readings are available to the program although parsing the data is > > running into difficulty associated, I believe, with Python3's fussiness > > with bytes, strings, etc. (The data I see is via some print statements > > stuck in the code.) > > > > line 72: originally it had > > > > mult=self.units.strip()+' '[0] > > TypeError: can't concat bytes to int > > > > I tried: > > mult=self.units.strip()+' '.encode()[0] > > > > and > > mult=self.units.strip()+b' '[0] > > > > to no avail. > > > > Note: > > data = b'DC -0.000 V\r' > > type data = <class 'bytes'> > > 01234567890123456789 > > type units = <class 'bytes'> > > > > But the good news is that when I changed the reading on the meter the > > value in data changed accordingly. So I see the issue now as one of > > knowing how to fix the Python so that it parses the data correctly, > rather > > than an issue of how to communicate with the dmm. > > > > BTW, I see no way to change the manufacture's sw running under Windows > to > > look at the usb, which is what I need to test the usb interface under > > Windows. I will explore the usb using Linux, which is the ultimate > goal. > > > > > _______________________________________________ > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug > _______________________________________________ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug