Hello all,
I am new to the list. I've just started to program with pygtk and i'm quite new to
python so i'm not really expert. The following is my problem.
I have two entries on my app. I am connecting the first one to a function with the
activate event which is the following:
(
The button gets connected to this function in the following way:
tbox2 = gtk.Entry()
tbox1 = gtk.Entry()
tbox1.connect("activate",self.conv,tbox2,"/my/dir/")
)
And his is the called function:
def conv(self, tbox2, dir):
# fetch the list of file sin a dir ..
list = os.listdir(dir)
for fname in list:
# Processing of the file with my code ..
...................
# Now from here on .. for every file that i have i would like to show
it's name in the second textbox..
tbox2.set_text(fname)
This part is not working well.. what happens is that the files actually get processed
by the rest of the function but when it comes to display the filename in the second
textbox nothing happens until the for cycle has reached the end. At this point the
last processed filename gets displayed in tbox2. As i said.. i would like that each
filename in turn that is being processed gets displayed in the second entry (tbox2).
Can someone please help by explaining what am i doing wrong...??
Another question is the following:
What event do i have to use to call a function when the gtk main window starts .. on
the tutorial there is only an example for the "destroy". Is there a list for these
events maybe also with an explanation of when they get fired and what they exactly do
..?
Thank you very much for any answer..
Best Regards,
Fabrizio Mazzoni
http://eteampoint.com
http://macron.com
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/