As we all know, ipython is a python interactive shell, which is much easier to use than the default pythonshell. IPython has many installation methods, which are mainly related to the operating system used. This article describes how to install and use ipython in windows. if you need it, you can refer to it.
Install ipython
Ipython can be used directlypip install ipython
If installation fails, follow the steps below to manually install
Download required files:
Link: http://pan.baidu.com/s/1dE756OL password: rlzh
Ipython is a python interactive shell, compared with the defaultpython shell
Easy to use, supports variable auto-completion, automatic indent, and supportbash shell
Command, built-in many useful functions and functions.
1. install ez_setup.py in cmd. the command is:python ez_setup.py
2. decompress ipython and install ipython in cmd. the command is as follows:python setupegg.py install
3. set ipython environment variables. the executable files of ipython are in the scripts folder under the python installation folder.
4. enter ipython in cmd after setting.
Iptyhon usage
1. command completion
When you enter an expression in shell, you only need to press the Tab key. any variables (such as objects and functions) in the current command control that match the input string will be found.
2. object introspection
Add a question mark (?) before or after the variable (?) You can display some common information about the object. This is called the introspection of objects.
If the object is a function or instance method, its docstring will also be realized.
Use ?? The source code of the function is displayed.
Some strings are configured with wildcards (*) to display all the names that match the wildcard expression.
Common shortcut keys
Ctrl-P or the up arrow key returns the command that begins with the currently entered text in the search command history
Ctrl-N or press the down arrow to start the current text in the search command history
Ctrl-R reverse historical search by row (partial matching)
Ctrl-Shift-v paste text from the clipboard
Ctrl-C abort the code currently being executed
Ctrl-A move the cursor to the beginning of the line
Ctrl-E move the cursor to the end of the row
Ctrl-K delete the text from the cursor to the end of the line
Ctrl-U clear all text 12 of the current row
Ctrl-F move the cursor one character forward
Ctrl-B move the cursor one character backward
Ctrl-L clear screen
Summary
The above is all about this article. I hope this article will help you in your study or work. if you have any questions, please leave a message.