程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

What does the run with Python console function in pycharm mean?

編輯:Python

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

One 、 What are the relevant command options ? Where to find ?

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 ,

Two 、 What are the properties of these two command 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 .

3、 ... and 、 Expand knowledge

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


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved