Automatic utF-8 encoding at the beginning of the file

File→Settings→Editor→Code Style→File and Code Templates→Python Script

Enter whatever you need to set in the text.

For example, UTF-8 encoding: # -*- coding: UTF-8 -*-

Illustration:



Finally, create a random Python file and the content will be generated automatically



Shortcut Settings

Setting “keymap

Shortcut key operation

run

Shift+ Alt +F10 execute the program

debugging

Shift + Alt + F9 Debug debugging
Shift + F9 Debug the current file
The F8 debugging mode is skipped
In F7 debugging mode
F9 fast debugging, stopping only at breakpoints and interactions

The editor

Alt + Shift Message
Ctrl + C Quickly copies the line where the cursor is
Ctrl + D directly copies the cursor line or selected content to the next line
Ctrl + A select all
Ctrl + Alt + L Automatically reformat the code
Alt + Enter Select OS import
Ctrl + Shift + N Quickly find files in the project
Ctrl + / comment
After the Tab indent
Shift Tab indented
Shift + Enter jumps to the next line
Ctrl + Enter jumps to the previous line

Debugging code

To set breakpoints

Click after each line number to set breakpoints (and debug start location), double-click to cancel

Chinese Interface Settings

Download the language pack: https://github.com/linzhenyuyuchen/Others/

Place resources_cn. Jar in the lib directory of the installation directory

As shown in figure:



Python console error: ‘PyDevTerminalInteractiveShell’ object has no attribute ‘has_readline

Version problem. Uninstall the current version and download the latest version

Solutions:

  • 1.conda uninstall ipython
  • PIP uninstall ipython uninstall all conflicting ipython
  • download
  • PIP install ipython == 4.2.0