Does Pycharm have Interactive Python Interpreter?

后端 未结 5 1282
小鲜肉
小鲜肉 2020-12-04 22:22

I am a fairly new Pycharm user switched from other IDEs recently.

One question I have is about the interactive python interpreter, which is the \"window\" I can type

相关标签:
5条回答
  • I'm using Pycharm community edition version 2016.1.2 I do the following to get an interactive prompt when debugging

    1. Debug a file (put a breakpoint somewhere you want to work with)
    2. In the debug window, there should be a 'Console' tab, select it
    3. On the left tool bar of the console, there is a button 2nd from bottom "Show Python Prompt". Press it
    4. You should now see an intereractive prompt you can use inside the console (allowing you to interact with the running code)

    As mentioned in the OP, to just get an interactive python prompt outside a running script, in the main menu bar select Tools->Python Console

    Magically this will appear:

    0 讨论(0)
  • 2020-12-04 22:30

    You can set the PyCharm then it runs the same as PyScripter.

    Run --> Edit Configurations --> Select "Show command line afterwards".

    0 讨论(0)
  • 2020-12-04 22:35

    Yes.

    To launch an interactive console
    
        On the main menu, choose Tools | Run Python console, or Tools | Run Django console
    

    Running Console

    0 讨论(0)
  • 2020-12-04 22:41

    Choose Run, Edit Configurations, check "Show command line afterwards". It doesn't work after an exception is raised, however.

    0 讨论(0)
  • 2020-12-04 22:50

    Run->Edit Configurations->Interpreter Options-> add -i

    There will be a red prompt when your run is finished.

    0 讨论(0)
提交回复
热议问题