python time
ecu_jon
hayesjdno3 at yahoo.com
Mon Mar 21 01:55:01 EDT 2011
i see. i was using time as a variable name , messing it all up.im not
going to post the whole backup script here, but here are a few lines
that i changed to make it work.
from datetime import datetime
from os.path import join, getsize
import time,os,string,getpass,md5,ConfigParser
from time import strftime,localtime
hrmin = config.get("myvars", "hrmin") #was time =, this is what did
it.
while a>0:
if datetime.now().weekday() == int(date):
str_time=strftime("%H:%M",localtime())
if str_time == hrmin:
print "do it"
os.system(cmd)
time.sleep(5)#will prolly want to change to to 30 or higher for
release file.
More information about the Python-list
mailing list