Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
Output subprocess to logfile and print the content
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Oct 25, 2016
1 parent 95a8b19 commit e7ce6f9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@
if on_rtd:
import subprocess as spr
print('Registering kernel')
spr.check_call([sys.executable] +
('-m ipykernel install --user --name python3 '
'--display-name python3').split(),
stderr=sys.stderr, stdout=sys.stdout)
with open('output.log', 'w') as f:
spr.call([sys.executable] +
('-m ipykernel install --user --name python3 '
'--display-name python3').split(),
stderr=f, stdout=f)
with open('output.log') as f:
print(f.read())


# The encoding of source files.
Expand Down

0 comments on commit e7ce6f9

Please sign in to comment.