- for filename in cf:
- if not filename: continue
- dest = filename + ".pysam.c"
- with open( filename ) as infile:
- with open( dest, "w" ) as outfile:
- outfile.write( '#include "pysam.h"\n\n' )
- outfile.write( re.sub( "stderr", "pysamerr", "".join(infile.readlines()) ) )
- with open( os.path.join( destdir, "pysam.h" ), "w" )as outfile:
- outfile.write ("""#ifndef PYSAM_H
+ '''update pysam files applying redirection of ouput'''
+ for filename in cf:
+ if not filename: continue
+ dest = filename + ".pysam.c"
+ with open( filename ) as infile:
+ with open( dest, "w" ) as outfile:
+ outfile.write( '#include "pysam.h"\n\n' )
+ outfile.write( re.sub( "stderr", "pysamerr", "".join(infile.readlines()) ) )
+ with open( os.path.join( destdir, "pysam.h" ), "w" )as outfile:
+ outfile.write ("""#ifndef PYSAM_H