-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3 version #13
Comments
I ran the 2to3 script in an attempt to port it over. But I quickly ran into other issues: https://stackoverflow.com/questions/33003498/typeerror-a-bytes-like-object-is-required-not-str The top rated answer there explains the issue. I haven't solved the problem, either. |
I have some experience porting Python code from 2 to 3 and may be able to help - is there a branch or fork currently underway? |
You should create a Pull Requests! I'll try to help as well. @ehiverson You can convert a string to bytes by using |
Ok! Here it is so far: |
I made really good progress and have the port complete. I have a GUI using pyqt5. Right now it works over USB only, but soon I'll have it working over LAN too. |
@ehiverson how's it going? Do you have LAN working yet? That's my use-case and I'd be happy to help test it. |
@DavidAntliff yes I do. I added a small user interface so it is no longer a command line tool. It also works with a tektronix 2024b. I couldn't confirm why the telnet library didn't work out of the box for RoGeorge, so I started using the regular telnet library and it works fine. For the rigol, one can also save the full memory of the scope, not just what is on the screen. |
Here's what I'm doing now: |
To get data only, you can do this (example with channel 1):
You can then plot a graph in the way you like (matplotlib...) |
Thanks @nbenm, this is useful to know because it doesn't require the heavier dependencies of this or @ehiverson's project. For me, the first method creates a PNG that looks OK in an image viewer for about a split second, then turns all blue. The file size is a few kilobytes smaller than those generated by the second method. The second method seems to create a proper PNG that I can view properly. However both methods require manually terminating the capture with CTRL-C - is that expected? |
@DavidAntliff this is how this works: |
@nbenm ah, so your capture ends automatically? I'm running your command on Mac so I wonder if that accounts for the difference - maybe |
@DavidAntliff try |
If you want to get real data, and not just a screen capture, you can do this:
replace 192.168.1.24 with your ip address You can then use matplotlib to draw graph, or simply use these data. |
@nbenm I'm using netcat installed with
The timeout option doesn't seem to work for me if a valid connection is made. It just waits for data on the socket indefinitely regardless of the However OSX's
Can you check you're not inadvertently using the OSX |
@DavidAntliff you are right. I use OSX nc. |
Python 2 will be shortly deprecated.
Do you intend to port DS1054Z_screen_capture to Python 3 ?
Some people like me, have completely removed Python 2.
The text was updated successfully, but these errors were encountered: