(another) python library

Post general discussions on using our drivers to write your own software here
Post Reply
heng
Newbie
Posts: 0
Joined: Mon Jun 11, 2012 7:08 pm

(another) python library

Post by heng »

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.

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

Re: (another) python library

Post by coflynn »

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

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

Re: (another) python library

Post by heng »

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

hmaarrfk
Newbie
Posts: 0
Joined: Sun Jun 24, 2012 11:41 pm

Re: (another) python library

Post by hmaarrfk »

Cython looks pretty interesting.

I'll probably use your project as a baseline the next time I want to interface some C code.

Post Reply