-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup legacy ipython code; remove packaging and colorama as deps
- Loading branch information
Showing
4 changed files
with
3 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Changelog | ||
--------- | ||
|
||
5.0.0 (unreleased) | ||
5.0.0 (2024-01-09) | ||
****************** | ||
|
||
Features: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
import packaging.version | ||
|
||
|
||
def is_modern_ipython(): | ||
def start_ipython_player(commands, speed): | ||
try: | ||
import IPython | ||
from doitlive.ipython.app import PlayerTerminalIPythonApp | ||
except ImportError: | ||
raise RuntimeError("ipython blocks require IPython to be installed") | ||
|
||
return packaging.version.parse(IPython.__version__) >= packaging.version.parse( | ||
"7.0.0" | ||
) | ||
|
||
|
||
def start_ipython_player(commands, speed): | ||
if is_modern_ipython(): | ||
from doitlive.ipython.app import PlayerTerminalIPythonApp | ||
else: | ||
from doitlive.ipython.legacy_app import PlayerTerminalIPythonApp | ||
|
||
PlayerTerminalIPythonApp.commands = commands | ||
PlayerTerminalIPythonApp.speed = speed | ||
PlayerTerminalIPythonApp.launch_instance() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters