def write_with_harness(codefile, sourcefile, start_linenum, linebuffer):
 with io.open(codefile, u'w') as code_filehandle:
  code_filehandle.write((u'#include<stdio.h>      // by md-split\n#include<stdlib.h>     // by md-split\n#include<tuple>        // by md-split\n#include<utility>      // by md-split\n#include<limits>       // by md-split\n#include<functional>   // by md-split\n#include<string>       // by md-split\n#include<map>          // by md-split\n#include<iostream>     // by md-split\n#include<vector>       // by md-split\n#include<algorithm>    // by md-split\n#include<memory>       // by md-split\nusing namespace std;   // by md-split\n// %s : %s\n' % (sourcefile, start_linenum)))
  for codeline in linebuffer:
   code_filehandle.write(codeline)

def write_with_harness ( codefile , sourcefile , start_linenum , linebuffer ) : with io . open ( codefile , u'w' ) as code_filehandle : code_filehandle . write ( ( u'#include<stdio.h>      // by md-split\n#include<stdlib.h>     // by md-split\n#include<tuple>        // by md-split\n#include<utility>      // by md-split\n#include<limits>       // by md-split\n#include<functional>   // by md-split\n#include<string>       // by md-split\n#include<map>          // by md-split\n#include<iostream>     // by md-split\n#include<vector>       // by md-split\n#include<algorithm>    // by md-split\n#include<memory>       // by md-split\nusing namespace std;   // by md-split\n// %s : %s\n' % ( sourcefile , start_linenum ) ) ) for codeline in linebuffer : code_filehandle . write ( codeline )
write output with additional lines to make code likely compilable .