text: Code Running Assistance
  Prerequisites
  - You are working with PyCharm version 5.0 or higher.
  - You have already created a Python project and populated it. You can use a project created in the tutorial Step 1. Creating and Running Your First Python Project.
  - You have Python interpreter already configured. Note that for the current project your Python interpreter version should be 3.0 or higher.
  First run
  Off we go. Open the class
  Solver.py for editing (F4), and right-click the editor background. Then choose on the context menu:
  The script runs and shows its output in the Run Tool Window::
  Let's explore in detail what we've done and what we see.
  Run/debug configuration - what is it?
  Each script or test you wish to run or debug from within PyCharm, needs a special profile that specifies the, marked with the green circle. It means that the Solver run/debug configuration has been created automatically by PyCharm, when you've chosenon the context menu. Now, as this run/debug configuration is marked with the green circle, it is current.
  Look at the main toolbar on the second image: the current run/debug configuration is visible in the combobox. To its right you see the run/debug configuration
  This command is first in the list. Choose Run/Debug Configurations dialog box opens:, and see the straight-forward ways. Let us now explore the other ways to run a script.
  As you have already learnt, running a script means in fact launching the current run/debug configuration. So, to run the Solver script, follow this procedure:
  -.
  Now you can observe results in the Run tool window.
  Test run
  We won't discuss here why testing is necessary - let's just assume that it is so, and discuss how PyCharm can help with it.
  Selecting a test runner
  First, choose the test runner. To do that, click
  on the main toolbar to open the Settings/Preferences dialog, and under the Tools node, click Python Integrated Tools page. Here is where you will select the default test runner:
  In this case, this is Unittests. Apply changes and close the dialog.
  Creating a test
  To run a test, you have to create it first. PyCharm suggests a smart way to stub a test out: click the class name and then press Ctrl+Shift+T, or on the main menu, choose.. So, we’ll import the class to be tested, and add a test method. The resulting code might be as follows:
  import unittest from Solver import Solver class MyTestCase(unittest.TestCase): def test_negative_discr(self): s = Solver() self.assertRaises(Exception) def test_something(self): self.assertEqual(True, False) if __name__ == '__main__': unittest.main()
  Running a test
  When ready with the testing code, right-click the test class name - the Run node of the context menu shows Unittests is next?
  - PyCharm starts, and then suspends execution at the first breakpoint.
  - The line at breakpoint becomes blue. It means that PyCharm has reached the line with the breakpoint, but has not yet executed it.
  - Next to the executed lines in the editor, the values of the variables appear.
  - The Debug tool window appears. This tool window shows all the important information related to debugging, and allows managing the debugging process.
  Refer to the product documentation for details.
  Working in the Debugger tab
  OK, we've paused at the first breakpoint. What's next?
  Press F9 or click
  . The program will resume and pause at the next breakpoint. This way you can step through all the set breakpoints, observing the variables used in the application. For more information, refer to the part Debugging of the documentation.
  Refer to the section Debug Tool Window. Debugger for details.
  Working in the Console tab
  Why do we need it at all? For example, you'd like to see the error messages, or perform some calculations not related to the current application... With PyCharm this is not a problem.
  Click the Console tab to bring it forward, and then, on the toolbar of this tab, click the button
  :
  The Python prompt appears, and the console becomes interactive. Try to execute Python commands in this interactive console:
  Note that interactive console provides code completion (Ctrl+Space) and history (Up/Down arrow keys). Refer to the page Using Debug Console for more information.
  You can always invoke the debug console by using the commandon the main menu.
  REPL - Running in an interactive console
  Finally, if you are used to working with an Interactive Console, you can also do that right from within PyCharm. To launch the console, choose on the main menu:
  