Working with EEST Libraries Interactively¶
You can work with EEST Python packages interactively with ipython
using:
uvx --with-editable . ipython
This command will create a virtual environment, install EEST's packages in "editable mode" (source changes get reflected in the interactive shell), and start an ipython
shell. You can then import any of the packages and experiment with them interactively.
Example: Working with ethereum_test_forks
See which defined forks are "ignored" by default:
from ethereum_test_forks import forks, get_forks
forks = set([fork for fork in get_forks() if fork.ignore()])
print(forks)
# -> {MuirGlacier, ArrowGlacier, GrayGlacier}
Required ipython
Configuration¶
To enable autoreload of changed modules in the current ipython
session, type:
%load_ext autoreload
%autoreload 2
To make this configuration persistent, add/uncomment the following lines to ~/.ipython/profile_default/ipython_config.py
:
c.InteractiveShellApp.exec_lines = ["%autoreload 2"]
c.InteractiveShellApp.extensions = ["autoreload"]