def input(self, _in, out, **kw):
<EOL>tmp = NamedTemporaryFile(suffix='<STR_LIT>', delete=False)<EOL>tmp.close()  <EOL>elm_make = self.binary or '<STR_LIT>'<EOL>change_directory = bool(self.change_directory or False)<EOL>source = kw['<STR_LIT>']<EOL>source_dir = os.path.dirname(source)<EOL>exec_dir = source_dir if change_directory else os.getcwd()<EOL>write_args = [elm_make, source, '<STR_LIT>', tmp.name, '<STR_LIT>']<EOL>with excursion(exec_dir), TemporaryFile(mode='<STR_LIT:w>') as fake_write_obj:<EOL><INDENT>self.subprocess(write_args, fake_write_obj)<EOL><DEDENT>cat_or_type = '<STR_LIT:type>' if platform == '<STR_LIT:win32>' else '<STR_LIT>'<EOL>read_args = [cat_or_type, tmp.name]<EOL>self.subprocess(read_args, out)<EOL>os.remove(tmp.name)<EOL>
Currently Elm does not write to stdout
(https://github.com/elm-lang/elm-make/issues/39), so we need to write
the compiled contents to a temporary file and then read it in order to
output to stdout.