Øyvind, I know this isn't Python advice, but in general it seems as if setting up a cron job would be easier. If you don't know how, I could gladly help.
- Sean On 6/6/06, Øyvind <[EMAIL PROTECTED]> wrote: > Hello. > > I need to make a program that does certain things every 5 minutes > mon-friday. I have started writing it like this: > > if strftime('%w') == 1: > if strftime('%M') % 5 == 0: > n.start() > > elif strftime('%w') == 2: > if strftime('%M') % 5 == 0: > n.start() > > ........ > > This seems kind of a redundant way of writing the code. > > I haven't gotten any statement like this to work: > if strftime('%w') == 1 or 2 or 3: > or > for strftime('%w') in range(1,5): > > What would be a more efficient way of writing it without writing it > several times? > > Thanks in advance, > Øyvind > > > -- > This email has been scanned for viruses & spam by Decna as - www.decna.no > Denne e-posten er sjekket for virus & spam av Decna as - www.decna.no > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor