XEM5010 : Can't open device

Hi there,
I am using XEM5010 application board and for my tests I use python. The tests has to be started from different python scripts :
Ex1 : myTest1.py can open the comm with XEM5010; the following code works :
self.xem = ok.FrontPanel()
if (self.xem.NoError != self.xem.OpenBySerial("")):
print “A device could not be opened. Is one connected?”
return(False)
Ex2 : myTest2.py calls myTest1.py two times
The first run is ok but the second run fails cause self.xem.OpenBySerial("") returns -1 !

So is there any way to close the comm properly ?

Thanks for helping me.
Runo

To close the device, you will need to destroy the object you created. Alternatively, you can use the same object to open another device as this will automatically close the first.

Indeed using a second XEM5010 works :
if (self.xem.NoError != self.xem.OpenBySerial("")):
print “A device could not be opened. Is one connected?”
return(False)

if (self.xem.NoError != self.xem.OpenBySerial("")):
print “A device could not be opened. Is one connected?”
return(False)

But in case of a third call, because both devices have been opened once it doesn’t work…
So my understanding is the devices have not been closed…

Anyway I didn’t succeed to destroy the object in Python. Still focusing on it.