Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:58:09+00:00 2026-06-12T23:58:09+00:00

Using the @task and submodule convention, my parent fabfile imports two submodules (dev and

  • 0

Using the @task and submodule convention, my “parent” fabfile imports two submodules (“dev” and “stable” whose tasks are defined in their respective init.py files). How to I get a @task in the dev module to invoke a task defined in the parent fabfile. I can’t seem to get the imports to work correctly.

I also tried using the imp.load_source but that produced a nasty circular import (fabfile.py imports dev which tries to import ../fabfile.py).

Using this as an example: http://docs.fabfile.org/en/1.4.3/usage/tasks.html#going-deeper

How would a task defined in lb.py call something in the top init.py or a task in migrations.py call something in the top init.py?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:58:10+00:00Added an answer on June 12, 2026 at 11:58 pm

    You can invoke fabric task by name:

    from fabric.api import execute, task
    @task
    def innertask():
        execute("mytask", arg1, key1=kwarg1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My main program running 8 tasks using Task.Factory.StartNew Each task will request XML format
I am using the Task Parallel Library to set up a chain of Tasks
When waiting for Tasks using Task.WaitAll and specifying a timeout if the WaitAll times
I am using Task.Factory.StartNew to make the long processing service calls off the UI
I have a task to perform an HttpWebRequest using Task<WebResponse>.Factory.FromAsync(req.BeginGetRespone, req.EndGetResponse) which can obviously
I'm using the Task class from JavaFx's API to perform network operations. The class
I am using asy task for doing loading proccess while the service is supposed
I've got an Ant task (using the maven task) set up to automatically download
I have submitted a task using executors and I need it to stop after
I am forced to execute a periodic task using a timer that is invoked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.