Seniors told me that the teacher in the laboratory with the IDE is Pycharm, I used a day, the overall line, that is, loading speed is too slow, but the next day when the card wants to let people squalling, CPU occupancy nearly 100%, the computer configuration is not high, I think not because this will immediately change computer it, On the Internet searched the sublime text, it is said that the IDE features particularly powerful, all installed to pay for the discovery, 70$ about, think about it or use notepad++ it, accidentally found can be configured notepad++ Let him call Python.exe automatically, instead of having to open the console manually each time, the method is as follows:
After opening a Python code file, press F5 (or run ... directly under the Run menu) to open the Run dialog box and enter Cmd/k Python "$ (full_current_path)" & ECHO in the text box. & PAUSE & EXIT, then click "Save", fill in a name, such as "Run with Python", configure the following shortcut keys (I set the SHIFT+F10), click OK. Then run the Python file just by pressing the configured shortcut key (my shift+f10) or clicking "Run with Python" on the Run menu. Note that you will not be able to run the code until you finish writing it, or you are running the last saved code
It is said that this configuration will also encounter the problem of file generation, I learned first, encountered a resolution
By the way, write the empty console manually enter the steps later forgotten:
For example, your file for hello.py, there is a word print (' Hello, World ') first put him in the Administrator folder (if not to this folder, you need to configure the environment variables, I forgot), and then enter the command, the following is the display results
C:\work>python hello.pyhello, world
Reference URL
The explanation of the added run command was also searched:
The meaning of cmd/k is to execute the following command, and to keep the window after execution is complete. (that is, cmd means to open the Command Prompt window and run the commands behind/k-python)
cmd/k python = = start –> run –> input cmd–> input python
$ (full_current_path) means the full path of the current file, which is the notepad++ macro definition
& is to connect more than one command
Pause indicates the end of the run and waits for an arbitrary key
Exit means close the command-line window (you can omit EXIT if you use cmd/c). )
Don't forget the coded settings in the notepad++!
See a lot of people on the Internet encountered the use of notepad++ writing Python code when adding comments on the issue of error, I also encountered this problem, the study found that this is because the encoding settings are incorrect
Python Authoring tools