Mercurial > hg > Members > aka > jupyter_CbC_kernel
changeset 35:e05900c7967e
Remove logging
author | Brendan Rius <brendan@omixy.com> |
---|---|
date | Sat, 30 Apr 2016 22:47:49 +0100 |
parents | b5bc8483ac3e |
children | 8acbab5a9f21 |
files | jupyter_c_kernel/kernel.py |
diffstat | 1 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/jupyter_c_kernel/kernel.py Sat Apr 30 21:45:41 2016 +0100 +++ b/jupyter_c_kernel/kernel.py Sat Apr 30 22:47:49 2016 +0100 @@ -30,20 +30,18 @@ queue.put(line) contents.close() - def write_contents(self, log): + def write_contents(self): try: stdout_contents = self._stdout_queue.get_nowait() except Empty: - log.error("stdout empty") + pass else: - log.error("stdout contains: {}".format(stdout_contents)) self._write_to_stdout(stdout_contents) try: stderr_contents = self._stderr_queue.get_nowait() except Empty: - log.error("stderr empty") + pass else: - log.error("stderr contains: {}".format(stderr_contents)) self._write_to_stderr(stderr_contents) @@ -99,8 +97,8 @@ with self.new_temp_file(suffix='.out') as binary_file: p = self.compile_with_gcc(source_file.name, binary_file.name) while p.poll() is None: - p.write_contents(self.log) - p.write_contents(self.log) + p.write_contents() + p.write_contents() if p.returncode != 0: # Compilation failed self._write_to_stderr( "[C kernel] GCC exited with code {}, the executable will not be executed".format( @@ -110,8 +108,8 @@ p = self.create_jupyter_subprocess([binary_file.name]) while p.poll() is None: - p.write_contents(self.log) - p.write_contents(self.log) + p.write_contents() + p.write_contents() if p.returncode != 0: self._write_to_stderr("[C kernel] Executable exited with code {}".format(p.returncode))