Question i want a help in ?

9 views
Skip to first unread message

blaz boy

unread,
Aug 23, 2008, 1:49:01 PM8/23/08
to pyth...@googlegroups.com
i have a small problem with making a timer :
i want a function to run every 1 minute but i'm using gtk so i can't make
while True:
   do_function()
   sleep(60)

i can't do that ... it'll freez my program , any idea ?

--
Blaze Boy
WebSites Designer
http://blazeeboy.blogspot.com

Tarek Amr

unread,
Aug 23, 2008, 5:46:15 PM8/23/08
to pyth...@googlegroups.com
Why don't you do this in a separate thread so your proggie don't freeze 

blaz boy

unread,
Aug 23, 2008, 6:28:34 PM8/23/08
to pyth...@googlegroups.com
ok , tell me how can i do that , popen() executes a process but it take a command name like [ls] or [cd /] or [dir] or something but i want and embeded function to be reqularely executed ?

2008/8/24, Tarek Amr <tare...@gmail.com>:

blaz boy

unread,
Aug 25, 2008, 9:48:01 AM8/25/08
to pyth...@googlegroups.com
i found a module called sched but it's so horrible and not well documented and when it is imported it produce an error i don't know what to do ?

2008/8/24, blaz boy <blaz...@gmail.com>:

Tarek Amr

unread,
Aug 25, 2008, 10:08:55 AM8/25/08
to pyth...@googlegroups.com

blaz boy

unread,
Aug 25, 2008, 9:21:38 PM8/25/08
to pyth...@googlegroups.com
yes it is , and i found the cause of error , and i'v made some test to use it ,
 i didn't understand the documentation at all but i'v managed to understant the basics of it by experiments, thanks for your consideration

and i'm seeing that you are the only active one in the group ,why no one respond?

2008/8/25, Tarek Amr <tare...@gmail.com>:

Tarek Amr

unread,
Aug 28, 2008, 10:16:30 AM8/28/08
to pyth...@googlegroups.com

blaz boy

unread,
Aug 28, 2008, 11:15:37 AM8/28/08
to pyth...@googlegroups.com
thanx so much , i finally used gobject to , u can c the beta release of my work at
http://memobee.blogspot.com
this require : python-gtk , python-notify

2008/8/28, Tarek Amr <tare...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages