JetBrains Fleet 1.44 Help

Run Python code

You can run your Python code right from Fleet provided that you have configured a Python interpreter.

Quick way

If you are not going to pass any parameters to your program, and your program does not require any specific actions to be performed before start, you can run it right from the editor.

  1. Click the run icon in the gutter and select Run.

    A menu appears on clicking run icons in the gutter
  2. Alternatively, place the caret at the class or main method that you want to run, and press ⌘ ⇧ R

Customizable way

If you are going to pass arguments or otherwise customize the execution of your script, use a run configuration.

Run configuration is a set of parameters that define how exactly your program will run. It contains a path to the Python script or a module name and an optional list of command-line arguments.

Create and launch a run configuration

  1. Click the Run icon (⌘ R) and select Create Run Configurations in run.json.

    Create a new configuration
  2. JetBrains Fleet provides completion for available configuration options as you type them in the run.json file. Select python:

    Editing a configuration template
  3. JetBrains Fleet inserts a Python run configuration template, where you need to specify the configuration name in name, and the Python script to be executed in arguments:

    minimal Python configuration
  4. Optionally, you can pass arguments to the Python script by adding them to arguments after the name of the script:

    Additional arguments in the run configuration
  5. Click the Run icon (⌘ R) and select the configuration.

    Newly created configuration is selected in the list

Manage running applications and tasks

Stop a task

  • Click the Stop button in the tab of the running task.

    The Stop icon in the top-right corner of a tab

View running tasks

  • Press ⌘ R. Run & Debug popup opens and lists the tasks. The tasks that are currently running are indicated with a green circle.

    Running tasks displayed in the Run and Debug popup
Last modified: 11 February 2024