Skip to content
Merged
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: 1 addition & 1 deletion fastprogress/fastprogress.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def update_graph(self, graphs, x_bounds=None, y_bounds=None, figsize=(6,4)):

# Cell
def printing():
return False if NO_BAR else (stdout.isatty() or IN_NOTEBOOK)
return False if NO_BAR else (hasattr(stdout, 'isatty') and stdout.isatty() or IN_NOTEBOOK)

# Cell
class ConsoleProgressBar(ProgressBar):
Expand Down
2 changes: 1 addition & 1 deletion nbs/01_fastprogress.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
"source": [
"#export \n",
"def printing():\n",
" return False if NO_BAR else (stdout.isatty() or IN_NOTEBOOK)"
" return False if NO_BAR else (hasattr(stdout, 'isatty') and stdout.isatty() or IN_NOTEBOOK)"
]
},
{
Expand Down