|
From: | VanL |
Subject: | [Fab-user] Exposed tasks via @task |
Date: | Mon, 19 Dec 2011 15:34:02 -0600 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Is there a way to
limit tasks to the context in which they are exposed? For
example, I like to build up a number of subfunctions that may be
individually useful, mark them as @tasks, and then have
higher-level tasks that use a number of these subfunctions to
perform some scripted action. If the subfunction task is
imported from another module, it results in the task name being
repeated in both contexts. For example: fabfile.py/ /__init__.py /utils.py # defines "which" /frobnosticate.py # imports "which" from utils and uses it in the function "frobber" fab -l utils.which frobnosticate.frobber frobnosticate.which In this case, frobnosticate.which *is* utils.which. Is it possible to keep tasks marked by the @task decorator to the context in which they are defined? Thanks, Van |
[Prev in Thread] | Current Thread | [Next in Thread] |