#NEWLINE# def pkg_config( name , arg , strip_prefix = 0 ) : #NEWLINE# #INDENT# args = [ 'pkg-config' , name , arg ] #NEWLINE# process = subprocess . Popen ( args , stdout = subprocess . PIPE , universal_newlines = True ) #NEWLINE# ( stdout , stderr ) = process . communicate ( ) #NEWLINE# exitcode = process . wait ( ) #NEWLINE# if exitcode : #NEWLINE# #INDENT# sys . exit ( exitcode ) #NEWLINE# #UNINDENT# args = stdout . strip ( ) . split ( ) #NEWLINE# if strip_prefix : #NEWLINE# #INDENT# args = [ item [ strip_prefix : ] for item in stdout ] #NEWLINE# #UNINDENT# return args