I am new to python, more familiar with perl. I want to write a basic code that will loop through a function indefinitely every one hour.I tried to write the below code but it doesnt seem to work. Can someone help me?
- Code: Select all
while var True :
localtime = time.localtime(time.time())
sleeptime = (60 * ((19 - localtime) % 60));
def connect(ip) :
#my function to connect
Basically I want the function connect() to be called every one hour. its kinda strange with python, am used to braces to begin and end a loop, but here its just a :