Test Output Callbacks.ipynb
291 lines
| 4.6 KiB
| text/plain
|
TextLexer
Basic OutputĀ¶
InĀ [Ā ]:
from IPython.display import display
InĀ [Ā ]:
print('hi')
InĀ [Ā ]:
display('hi')
InĀ [Ā ]:
1
InĀ [Ā ]:
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1,3,2])
InĀ [Ā ]:
%%javascript
console.log("I ran!");
InĀ [Ā ]:
%%html
<b>bold</b>
InĀ [Ā ]:
%%latex
$$
a = 5
$$
input_requestĀ¶
InĀ [Ā ]:
raw_input("prompt > ")
set_next_inputĀ¶
InĀ [Ā ]:
%%writefile tst.py
def foo():
pass
InĀ [Ā ]:
%load tst.py
Pager in execute_replyĀ¶
InĀ [Ā ]:
plt?
object_infoĀ¶
InĀ [Ā ]:
# press shift-tab after parentheses
int(
completeĀ¶
InĀ [Ā ]:
# press tab after f
f
clear_outputĀ¶
InĀ [Ā ]:
import sys, time
from IPython.display import clear_output
InĀ [Ā ]:
for i in range(10):
clear_output()
time.sleep(0.25)
print(i)
sys.stdout.flush()
time.sleep(0.25)
InĀ [Ā ]:
for i in range(10):
clear_output(wait=True)
time.sleep(0.25)
print(i)
sys.stdout.flush()
InĀ [Ā ]: