![]() |
2010-04-03
, 11:34
|
Posts: 1,101 |
Thanked: 1,185 times |
Joined on Aug 2008
@ Spain
|
#2
|
The Following User Says Thank You to maacruz For This Useful Post: | ||
![]() |
2010-04-03
, 12:25
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#3
|
![]() |
2010-04-03
, 12:30
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#4
|
![]() |
2010-04-03
, 12:34
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#5
|
![]() |
2010-04-03
, 12:48
|
|
Posts: 385 |
Thanked: 344 times |
Joined on Jan 2010
@ Israel
|
#6
|
http://stackoverflow.com/questions/8...hile-true-loop
i found this but :/ i didnt get it
The Following 2 Users Say Thank You to omeriko9 For This Useful Post: | ||
![]() |
2010-04-03
, 13:47
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#7
|
![]() |
2010-04-03
, 13:57
|
|
Posts: 385 |
Thanked: 344 times |
Joined on Jan 2010
@ Israel
|
#8
|
import threading
class gui(threading.Thread):
__def __init__(self):
____self.a=0
____.......
____threading.Thread.__init__(self)
__def run(self):
____while 1:
______print self.a
______self.a=self.a+1
gui().start()
gtk.main()
but in this case print function stopping after gtk.main() shows up
im sorry i know im asking a lot :/ :/ im a total noob :/
thanksfor help
EDIT: it starts to print again after i close gtkwindow
class gui(threading.Thread): __def __init__(self): ____self.a=0 ____....... ____threading.Thread.__init__(self) __def run(self): ____f = open('/home/user/t.txt', 'a') ____while 1: ______print self.a ______f.write(str(self.a)) ______self.a=self.a+1 gui().start() gtk.main()
![]() |
2010-04-03
, 14:10
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#9
|
![]() |
2010-04-03
, 14:15
|
Posts: 308 |
Thanked: 62 times |
Joined on Jun 2009
@ Turkiye
|
#10
|
im using python
i have a problem about "while loops"
but the problem is when i run gtk.main() function it is not allowing me to run another loop. :/ and if i run another loop it is stopping gtk window
:/
def read():
global sock
while 1:
a=sock.recv(1024)
if len(a)==0: break
print a
this is the function i need to run meanwhile gtk is running :/
please help
i googled a lil bit but i couldnt find a proper tutorial on handling multitasking
Mplayer Full ShortCut List
http://www.keyxl.com/aaa2fa5/302/MPl...-shortcuts.htm
Mclightning.com
DegCal - Right Triangle Degree Calculator