Re: Python Guru needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-01-07 at 17:17 -0500, Jim wrote:
> FC 10/KDE
> 
> I'm trying to set a simple Alarm Clock in FC10 and I have a Python 
> script I picked up, but I have error, running the script.
> Can you explain to me with # comments on each line how to make this work.
> 
> import time
> import os
> 
> not_executed = 1
> 
> while(not_executed):
> dt = list(time.localtime(time.time()) <- clauses in the body of a while must 
						be indented.
> hour = dt[3]
> minute = dt[4]
> if hour == 5 and minute == 45:
> os.popen2("open /Users/jun/shout.mp3")
> not_executed = 0
>  
> 
> Error Message;
> 
> $ python AlarmClock
>   File "AlarmClock", line 7
>     dt = list(time.localtime(time.time())
>      ^
> IndentationError: expected an indented block
> 
> 
> Thanks  Jim
> 
> 
--
=======================================================================
Batteries not included.
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@xxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux