Gunakan ipython sihir dalam skrip
from IPython import get_ipython
ipython = get_ipython()
ipython.magic("timeit abs(-42)")
bougui
from IPython import get_ipython
ipython = get_ipython()
ipython.magic("timeit abs(-42)")