IPython:An Interactive Computing and Development Enviroment
iPython is so convenient that you should use it!
__ Cleans the data display __
You can complete with the __tab key __
__ You can see detailed information by adding? After the object __ numpy.ndarray.T?
You can read the source code by adding ?? after the object (only when you can see it)
You can also search for namespaces with +?! numpy. * save *?
You can also run scripts with % run
! % run hello_world.py
You can copy and paste scripts with blank lines using __% paste
! __
If you copy and paste the indented source code, the indent will be pasted without being formatted properly. If you do% paste on iPython, it will be pasted with blank lines, so you can execute it properly.
% Cpaste
will paste as much as you like
You can clear the screen as much as you like with + Ctrl + L
__ Traceback when an error occurs extends to the stack __ (a little hard to see)
You can see a lot of magic commands starting with% with % magic
(__% whos
is convenient! __)
You can also use a rich GUI console for syntax highlighting by launching with ʻipython qtconsole`! (PyQt or PySide required)
ʻIpython --pylab` will import functions such as matplotlib into the top-level namespace if you start it.
_IX
can call the input command on line X (at In [X]:), and _X
can call the output command on line X.
You can see the command history used in __% hist
! (Convenient to log!) __
__! cmd
can execute shell commands __ (! Ipython
can start multiple times)
You can change the working directory with % cd directory
If you register an alias with % alias alias_name cmd
, you can execute cmd with alias_name.
You can call the directory registered with % bookmark_name directory
with bookmark_name.
You can use the interactive debugger by turning on Automatic pdb calling with % pdb
!
You can measure the method execution time with % time method
__ You can create a browser-based book by doing ʻipython notebook --pylab inside` at startup! Moreover, it displays the pandas DataFrame in tabular format! __
Recommended Posts