Dangerous Prototypes

Other projects => Open Bench Logic Sniffer => Client software => Topic started by: mwilson on June 29, 2011, 07:32:12 pm

Title: Python-based Client
Post by: mwilson on June 29, 2011, 07:32:12 pm
Yet another client, this one written in Python 2.  It depends on wxPython, pySerial and NumPy packages.  I'm developing and testing in Ubuntu Linux, but with luck it will run under Windows and OS/X as well.

The most basic installation will be to unpack the source into a directory, and run it from there.  It's run from the command line, but once suitable .ini files are set up it can be run from a mouse click.

Source code and documentation are available through <http://melwilsonsoftware.ca/> .

Licensed under GPL version 3.

        Cheers,        Mel.
Title: Re: Python-based Client
Post by: arhi on June 29, 2011, 08:29:52 pm
screenshot?
Title: Re: Python-based Client
Post by: mwilson on June 29, 2011, 08:34:12 pm
There are a bunch on the website <http://www.melwilsonsoftware.ca/logic-sniffer/index.html> .  I could attach some in the forum, if that's allowed, I guess.
Title: Re: Python-based Client
Post by: ian on June 29, 2011, 08:45:58 pm
Please attach some pohotos, love to see them. I'll post this up tomorrow.
Title: Re: Python-based Client
Post by: mwilson on June 29, 2011, 08:55:06 pm
Here's the promo screenshot:(http://http://www.melwilsonsoftware.ca/logic-sniffer/Screenshot-Logic_Sniffer_S1.png)

Main window: (http://http://www.melwilsonsoftware.ca/logic-sniffer/Screenshot-Logic_Sniffer.png)

SUMP setup: (http://http://www.melwilsonsoftware.ca/logic-sniffer/Screenshot-SUMP_Device_Settings.png)

UART Analyzer setup: (http://http://www.melwilsonsoftware.ca/logic-sniffer/Screenshot-UART_Settings.png)

UART Data: (http://http://www.melwilsonsoftware.ca/logic-sniffer/Screenshot-Capture_0_UART.png)


        Cheers,        Mel.
Title: Re: Python-based Client
Post by: adamoutler on June 30, 2011, 01:14:48 am
That's great!  You should do a java port next!    I've decided to use java for everything as its cross platform and will run on any interperater.  Python 3.0 screwed my interest in learning python. 

Don't take me wrong.  This is awesome!
Title: Re: Python-based Client
Post by: jawi on June 30, 2011, 09:21:41 am
@mwilson: It certainly looks familiar... ;) Will give it a spin somewhere soon... Good job!
Title: Re: Python-based Client
Post by: arhi on June 30, 2011, 01:09:22 pm
@adamoutler, what's wrong with python 3 compared to older versions? I do speak many languages (over 60) and python is the only one that disgust me .. but I did not found anything especially ugly with v3 ?
Title: Re: Python-based Client
Post by: mwilson on July 01, 2011, 04:21:00 pm
[quote author="jawi"] It certainly looks familiar... ;) ...[/quote]

Yes, I had some influences and some inspiration ;).  Without the java client to run, I would never have figured out what the Logic Sniffer was doing.  Thanks.

As for a Java port adamoutler mentioned, there are good reasons for me to build up some competence in Java, but it won't happen overnight.  Anyway, it's open source.  If any ideas emerge in the python client that are worth implementing in a java client, that's all good, right?
Title: Re: Python-based Client
Post by: adamoutler on July 01, 2011, 07:46:48 pm
[quote author="arhi"]@adamoutler, what's wrong with python 3 compared to older versions? I do speak many languages (over 60) and python is the only one that disgust me .. but I did not found anything especially ugly with v3 ?[/quote]
I've been programming since I was 9..  Python 3 is like the time when Microsoft released .NET back in 2000ish.  I was familiar with Visual Studio 5, however with .NET, I could not even display a textbox. 

Now, instead of building upon Python's existing foundations, in Python3 they broke just about everything I had learned about Python 2.6...  I decided at that point, if they can't support the hobbiest programmer, then I won't support them.

I don't get paid to learn programming languages.  I program in my spare time..  I don't want to have to learn a new language with each version, and I don't want to have to specify a version of an interperater with every program.  They're not stable enough.  Java has been through similar changes but nothing drastic.  Also, the same programs you wrote on Windows in 2001,  still work 10 years later with a double-click on Linux.
Title: Re: Python-based Client
Post by: justyn on July 06, 2011, 06:18:44 pm
@mwilson
This looks great, very useful for me as I'm much happier coding in python, any chance of a donate/flattr button somewhere on your page?
Title: Re: Python-based Client
Post by: herrold on July 06, 2011, 09:43:20 pm
Any chance of adding the 'setup.py' file to your code, so I may package it for more portable installation

Thanks

-- Russ herrold
Title: Re: Python-based Client
Post by: mwilson on July 09, 2011, 06:41:56 pm
@justyn
I'm flattered that you approve so much. For now, I'm in it more for the fame than the fortune.  If I get more prolific, I guess a donate/flattr button will be a good idea.  For now, I get to ignore all those spam messages "Your Pay-Pal account has been suspended ..."
Hope pyLogicSniffer continues to be useful.
Title: Re: Python-based Client
Post by: mwilson on July 09, 2011, 06:48:03 pm
@herrold
I was hoping I could wait till the code was more mature before I did a setup.  I'm still kind of new to production Python.. I've set up library packages before, but not applications.

For example, I know sump.py could appropriately be put into site-packages.  I'm not sure about logic_sniffer.py and its application-code friends.  Any suggestions as to how you would like to see this set up?

In the meantime I've added a save-to-CSV feature.
Title: Re: Python-based Client
Post by: billium on April 29, 2012, 04:41:19 pm
Tought I would give it a go but just got:
Code: [Select]
  File "./logic_sniffer.py", line 27
    time_units_text = ['nS', u'u03bcS', 'mS', 'S']
                                  ^
SyntaxError: invalid syntax

Don't know python, so won't bother trying again.  Is your project still alive?
Title: Re: Python-based Client
Post by: mwilson on April 29, 2012, 05:39:48 pm
Sorry about that.  Python has gone through some changes in the Unicode area.  You might get trouble just from using a different Python version from me.  I was trying to be cute and put a real mu in there.  You can sub that out with 

Code: [Select]
time_units_text = ['nS', 'uS', 'mS', 'S']

The project is still alive in my mind, but it's been stuck behind other projects for quite a while.  I hope to get in a new wave of upgrades; I can't tell anybody when.

Re versions, I've been running Python 2.6.5 and wx 2.8.10.1.