import spidev


class RPI_SPI ():
	def __init__(self):
		try:
			self.spi_0 = spidev.SpiDev()
			self.spi_1 = spidev.SpiDev()
			self.spi_0.open(0,0)
			self.spi_1.open(0,1)
		except:
			self.spi_0 = None
			self.spi_1 = None
			
	def get_spi_0(self):
		return self.spi_0
		
	def get_spi_1(self):
		return self.spi_1
		

@@ -236,66 +236,87 @@
 get_
-spi_0(self):%0A%09%09return self.spi_0%0A%09%09%0A%09def get_spi_1(self)
+device(self,device=0):%0A%09%09if device==0:%0A%09%09%09return self.spi_0%0A%09%09elif device==1
 :%0A
+%09
 %09%09re
@@ -333,9 +333,31 @@
 spi_1%0A%09%09
+else :%0A%09%09%09return None%0A
 %0A

Update rpi_spi.py