#!/usr/bin/env python2 import sys sys.path.append('.') import my_module, other_module from my_module import mod_a from my_module import mod_b from other_module import other for line in sys.stdin: mod_a.bla(line) mod_b.blubb(line) other.foo(line)