Catalog
One 、 What are the relevant command options ? Where to find ?
Two 、 What are the properties of these two command options ?
3、 ... and 、 Expand knowledge
First option :【Edit Configuration】 Window 【Run with Python Console】 Options
1. Enter in the menu bar or the Quick Access Toolbar in the upper right corner Edit Configuration window .
menu bar ——run——edit configuration
Top right quick access toolbar ——edit configuration
2. selected py file ——Execution——Run with Python Console.
The second command option :【Setting】 window ( Shortcut key :Ctrl+Alt+S) Medium 【Use existing console for "Run with Python Console"】 Options ,
1. The constraint range is different
For option one , Creating py File is inherited by default template Check status of this option in , every last py The status of the file can be checked in the subsequent change options , That is, option one is for each py Files are constrained independently .
For option 2 , Because it is in the global settings window , So the constraints are all py file .
2. The effect is different
For option one , Is used in run Keep all variables and compiled environment in console Window , Convenient for users to use console Window to debug the code / test .
For option 2 , When option 1 is checked , If you do not check option 2 , Every time run Will create a new console window , every last console The variables of the window and the compiled environment exist independently , If you check option 2 , for the first time run After getting console The content of the window will be followed up run Of console Window content overlay ; Because it is based on option one , When all the selected items are not opened , Option two doesn't work either , Because it won't open at all console window .
Although the use of console window , But the essence is to use run To run the program , And directly execute some strings of code ( Shortcut key :Shift+Alt+E) There's a difference . Because the direct execution code of the latter , Will automatically copy the code into console Execute... In the window , Will not take advantage of arguments And user-made under the same level folder py File module .
See the article for details python error :the following arguments are required, Tangandi course credit card project solution _ The little villain's blog -CSDN Blog