#NEWLINE# def get( self , option ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# ( stdout , stderr ) = subprocess . Popen ( [ self . cmd , option ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) . communicate ( ) #NEWLINE# #UNINDENT# except OSError as ex : #NEWLINE# #INDENT# raise OSError ( 'Could not find geos-config script' ) #NEWLINE# #UNINDENT# if ( stderr and ( not stdout ) ) : #NEWLINE# #INDENT# raise ValueError ( stderr . strip ( ) ) #NEWLINE# #UNINDENT# if ( sys . version_info [ 0 ] >= 3 ) : #NEWLINE# #INDENT# result = stdout . decode ( 'ascii' ) . strip ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result = stdout . strip ( ) #NEWLINE# #UNINDENT# log . debug ( '%s %s: %r' , self . cmd , option , result ) #NEWLINE# return result