#!/usr/bin/env python # coding: utf-8 # # Basic Output # In[ ]: from IPython.display import display # In[ ]: print('hi') # In[ ]: display('hi') # In[ ]: 1 # In[ ]: get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib.pyplot as plt plt.plot([1,3,2]) # In[ ]: get_ipython().run_cell_magic('javascript', '', 'console.log("I ran!");\n') # In[ ]: get_ipython().run_cell_magic('html', '', 'bold\n') # In[ ]: get_ipython().run_cell_magic('latex', '', '$$\na = 5\n$$\n') # # input_request # In[ ]: raw_input("prompt > ") # # set_next_input # In[ ]: get_ipython().run_cell_magic('writefile', 'tst.py', 'def foo():\n pass\n') # In[ ]: get_ipython().run_line_magic('load', 'tst.py') # # Pager in execute_reply # In[ ]: get_ipython().run_line_magic('pinfo', '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[ ]: