I am new in python and I making a new code and I need a little help
Main file :
import os
import time
import sys
import app
import dbg
import dbg
import
Why not doing this: define a method in the module you import and call this method 5 times in a loop with a certain time.sleep(x)
in each iteration.
Edit:
Consider this is your module to import (e.g. very_good_module.py
):
def interesting_action():
print "Wow, I did not expect this! This is a very good module."
Now your main module:
import time
import very_good_module
[...your code...]
if __name__ == "__main__":
while True:
very_good_module.interesting_action()
time.sleep(5)