libftdi Archives

Subject: Re: Parallel installation of libftdi 1.x and 0.x

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 7 Jul 2012 15:03:16 +0200
On Thursday, 28. June 2012 18:53:32 Thomas Jarosch wrote:
> On 06/24/2012 12:47 PM, Thomas Jarosch wrote:
> > The python wrapper is more complex: If we just rename
> > the module from "ftdi" to "ftdi1", all client code would
> > need adaption, too. Hopefully there's a way to avoid this. Michel?
> 
> Seems like it's not easily possible.
> Basically we have two options here:
> 
> a) Rename everything to "ftdi1" for the python wrapper.
>    All client code needs to be changed.
> 
>    This would allow parallel installation of libftdi 0.x
>    or future libftdi versions.

I finally opted for solution a) as I've just learned a nice python trick:

One can rename a library during the import. So this results in a one line 
change in client code and will give untouched code with parallel libftdi 
installations maximum compatibility.

RFC patch follows in a second email.

Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread