Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
NetCDF changes stdout to the terminal. Here we try to reset it.
  • Loading branch information
stoiver committed May 11, 2018
1 parent 8a073b5 commit f283148
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions anuga/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@
your python interpreter from there."""
raise ImportError(msg)

#---------------------------------
# NetCDF changes stdout to terminal\
# Causes trouble when using jupyter
#---------------------------------
import sys
_stdout = sys.stdout

#---------------------------------
# Setup the nose tester from numpy
Expand Down Expand Up @@ -331,9 +337,15 @@ def get_args():

from anuga.config import g
from anuga.config import velocity_protection

#--------------------------------------
# NetCDF changes stdout to the terminal
# This resets it
#--------------------------------------
reload(sys)
sys.stdout = _stdout







0 comments on commit f283148

Please sign in to comment.