Update tpactions.py

Compacting @done scan through subtasks into a single function.
Merge pull request #2 from philgruneich/master

Update tpactions.py