Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ temp_testing/*
build
dist
Issues/rule_keywords/test_DeleteMolecules_changed.bngl
.jules/
__pycache__/
8 changes: 6 additions & 2 deletions bionetgen/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ def generate_notebook(app):
app.log.debug(f"Writing notebook to file: {fname}", f"{__file__} : notebook()")
notebook.write(fname)
# open the notebook with nbopen
# TODO: deal with stdout/err
app.log.debug(
f"Attempting to open notebook {fname} with nbopen",
f"{__file__} : notebook()",
Expand All @@ -242,4 +241,9 @@ def generate_notebook(app):
stderr = getattr(subprocess, app.config["bionetgen"]["stderr"])
if args.open:
command = ["nbopen", fname]
rc, _ = run_command(command)
process = subprocess.Popen(command, stdout=stdout, stderr=stderr)
p_out, p_err = process.communicate()
if p_out:
app.log.info(p_out.decode("utf-8") if isinstance(p_out, bytes) else p_out)
if p_err:
app.log.error(p_err.decode("utf-8") if isinstance(p_err, bytes) else p_err)
Loading