Test and Measurement Forum

(another) python library

Post general discussions on using our drivers to write your own software here

(another) python library

Postby heng » Thu Jan 23, 2014 9:48 pm

I wrote a python library a little while ago for wrapping the libps3000a which I finally got around to posting online:

https://github.com/hgomersall/PicoPy

It's pretty capable, with (I think) all the trigger capabilities exposed through a neat interface as well as nice pythonic wrapper class (pico3k). The AWG stuff is not yet done as I didn't have a use for it whilst writing the code.

Though the class is called pico3k, the intention was to abstract all the features of the whole range, though I only have a 3207B.

The build system is a bit rough and ready - it works ok on my Linux machine, but might be a bit flakey on Windows - it shouldn't be too hard to make more robust though (more like another of my projects: https://github.com/hgomersall/pyFFTW). It would be good to be able to distribute the driver binaries with it. The licensing is probably a bit dodgy at the moment with regards linking to the driver libs (GPL), but that's just because I slapped the default on when I began. I'll change it to a 2-clause BSD or something when I get some time.

Patches gratefully received.

Apologies to others that have begun similar projects. I should have posted this a long time ago.
heng
Newbie
 
Posts: 0
Joined: Mon Jun 11, 2012 7:08 pm

Re: (another) python library

Postby coflynn » Mon Jan 27, 2014 5:09 pm

Ah dang, would have been nice to have a month or so ago ;-) Well if there's any other ideas you need for your library feel free to steal from another one by hmaarrfk & myself at https://github.com/colinoflynn/pico-python

We've tried to abstract off the classes more, our lib supports the 4000&6000 devices, although no support for 3000 added. We're also using the 2-clause BSD, so if you end up re-licensing in that version may borrow some of your code in our project!

Regards,

-Colin
coflynn
Newbie
 
Posts: 0
Joined: Sun Dec 15, 2013 10:23 pm

Re: (another) python library

Postby heng » Tue Jan 28, 2014 3:15 pm

Yeah, I'm sorry about that - it was because I noticed the new lib that I realised I'd forgotten all about mine. Each has features the other is lacking, so they might serve as a useful reference to each other. There is a problem in that I've used Cython and you (I recall) use ctypes.

Cheers,

Henry
heng
Newbie
 
Posts: 0
Joined: Mon Jun 11, 2012 7:08 pm

Re: (another) python library

Postby hmaarrfk » Mon Feb 10, 2014 1:45 am

Cython looks pretty interesting.

I'll probably use your project as a baseline the next time I want to interface some C code.
hmaarrfk
Newbie
 
Posts: 0
Joined: Sun Jun 24, 2012 11:41 pm


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests