Execute function if other function is completed, Python

46 views
Skip to first unread message

Victor Tingström

unread,
Jun 29, 2015, 11:10:24 AM6/29/15
to pytho...@googlegroups.com
Hey,

First and foremost, thank you for this package - it's awesome. However, it seems as though I've encountered a problem. 

A simplified version of my problem is that I have two separate functions in two separate scripts called task_func1 and task_func2, and that I wish to execute task_func2 iff task_func1 has been executed. The functions are imported to a main file such that executing them using doit isn't a problem. My question is; how do I specify the dependency if they are in two different scripts? I tried using file_dep: task_func1 as an element of the dictionary in the return of task_func2, but it just skipped it if task_func2 came first. 

Best regards,

Victor 

Victor Tingström

unread,
Jun 30, 2015, 9:07:14 AM6/30/15
to pytho...@googlegroups.com
I worked around the problem by letting each function define an empty `.txt` file - a bit tedious, but it works.

Best,

Victor
Reply all
Reply to author
Forward
0 new messages