Suppose I have such a method in the fablib.py
file:
def init(file='production_server.yaml', f_before=before_init, f_after=after_init): f_before() # This function will be called from other module server = ServerSSH(file) # my class server.create_dir() server.init() f_after() # This function will be called from other module too
Next, I create the file fabfile.py
. How do I make the functions f_before
and f_after
so that they are visible and called in the function of the fablib
module?
Running the script using the fab
command.