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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed initial blank lines removed from Syntax https://github.com/willmcgugan/rich/issues/1214
- Added Console.measure as a convenient alias for Measurement.get
- Added support for pretty printing attrs objects
- Added support for Spyder

## [10.1.0] - 2020-04-03

Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ The following people have contributed to the development of Rich:
- [Will McGugan](https://github.com/willmcgugan)
- [Nathan Page](https://github.com/nathanrpage97)
- [Clément Robert](https://github.com/neutrinoceros)
- [Carlos Cordoba](https://github.com/ccordoba12)
7 changes: 5 additions & 2 deletions rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,11 @@ def _is_jupyter() -> bool: # pragma: no cover
return False
ipython = get_ipython() # type: ignore
shell = ipython.__class__.__name__ # type: ignore
if "google.colab" in str(ipython.__class__) or shell == "ZMQInteractiveShell":
return True # Jupyter notebook or qtconsole
if "google.colab" in str(ipython.__class__) or shell in [
"ZMQInteractiveShell",
"SpyderShell",
]:
return True # Jupyter notebook, qtconsole or Spyder
elif shell == "TerminalInteractiveShell":
return False # Terminal running IPython
else:
Expand Down