#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# BaseTestIO . setUp ( self ) #NEWLINE# if sys . platform . startswith ( 'win' ) : #NEWLINE# #INDENT# distantfile = 'http://download.multichannelsystems.com/download_data/software/neuroshare/nsMCDLibrary_3.7b.zip' #NEWLINE# localfile = os . path . join ( tempfile . gettempdir ( ) , 'nsMCDLibrary_3.7b.zip' ) #NEWLINE# if ( not os . path . exists ( localfile ) ) : #NEWLINE# #INDENT# urlretrieve ( distantfile , localfile ) #NEWLINE# #UNINDENT# if platform . architecture ( ) [ 0 ] . startswith ( '64' ) : #NEWLINE# #INDENT# self . dllname = os . path . join ( tempfile . gettempdir ( ) , 'Matlab/Matlab-Import-Filter/Matlab_Interface/nsMCDLibrary64.dll' ) #NEWLINE# if ( not os . path . exists ( self . dllname ) ) : #NEWLINE# #INDENT# zip = zipfile . ZipFile ( localfile ) #NEWLINE# zip . extract ( 'Matlab/Matlab-Import-Filter/Matlab_Interface/nsMCDLibrary64.dll' , path = tempfile . gettempdir ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . dllname = os . path . join ( tempfile . gettempdir ( ) , 'Matlab/Matlab-Import-Filter/Matlab_Interface/nsMCDLibrary.dll' ) #NEWLINE# if ( not os . path . exists ( self . dllname ) ) : #NEWLINE# #INDENT# zip = zipfile . ZipFile ( localfile ) #NEWLINE# zip . extract ( 'Matlab/Matlab-Import-Filter/Matlab_Interface/nsMCDLibrary.dll' , path = tempfile . gettempdir ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if sys . platform . startswith ( 'linux' ) : #NEWLINE# #INDENT# if platform . architecture ( ) [ 0 ] . startswith ( '64' ) : #NEWLINE# #INDENT# distantfile = 'http://download.multichannelsystems.com/download_data/software/neuroshare/nsMCDLibrary_Linux64_3.7b.tar.gz' #NEWLINE# localfile = os . path . join ( tempfile . gettempdir ( ) , 'nsMCDLibrary_Linux64_3.7b.tar.gz' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# distantfile = 'http://download.multichannelsystems.com/download_data/software/neuroshare/nsMCDLibrary_Linux32_3.7b.tar.gz' #NEWLINE# localfile = os . path . join ( tempfile . gettempdir ( ) , 'nsMCDLibrary_Linux32_3.7b.tar.gz' ) #NEWLINE# #UNINDENT# if ( not os . path . exists ( localfile ) ) : #NEWLINE# #INDENT# urlretrieve ( distantfile , localfile ) #NEWLINE# #UNINDENT# self . dllname = os . path . join ( tempfile . gettempdir ( ) , 'nsMCDLibrary/nsMCDLibrary.so' ) #NEWLINE# if ( not os . path . exists ( self . dllname ) ) : #NEWLINE# #INDENT# tar = tarfile . open ( localfile ) #NEWLINE# tar . extract ( 'nsMCDLibrary/nsMCDLibrary.so' , path = tempfile . gettempdir ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise unittest . SkipTest ( 'Not currently supported on OS X' )