Gie
Gie

Reputation: 1939

Execute fabric task from PyCharm

I'm developing Django project in PyCharm and everything works properly. I've install fabric to my virtual env, and add fabfile.py in to my project. In this file I placed one test task definition:

def hello():
    print("Hello fabric!")

After that I'm trying to execute this task directly from my PyCharm. Do you have any suggestions how can I do it?

Upvotes: 13

Views: 4649

Answers (1)

Pavel Anossov
Pavel Anossov

Reputation: 62948

Add a "Python" run configuration with /path/to/your/env/bin/fab as the script and hello as the script parameters.

Set the working directory to the directory with the fabfile.

Example:

enter image description here

Upvotes: 33

Related Questions