If there is code that you don't want executed when a module is imported, it should be protected as such:
if __name__ == "__main__":
# code to run only when module is executed
# as a script, not when imported.
Modules intended to be imported should probably not be writing to standard output.