update_idletasks didn't work. The code is this
file_path = filedialog.askopenfilename(filetypes=[('text files', '.txt')], multiple=True, defaultextension=".txt") for path in file_path: fo = open(path, "r") for line in fo: if myCase(line.lower()): myList.append(line.lower()) fo.close() def myCase(c): if c in myList: return False if len(c) < 8 or len(c) > 80: return False return True This processes a fair bit of data On Thursday, June 19, 2014 12:06:26 AM UTC+1, Ian wrote: > On Wed, Jun 18, 2014 at 4:32 PM, cutey Love <cuteywithl...@gmail.com> wrote: > > > Hi, thanks for the replies, > > > > > > I mean windows displays "Not responding close the program now" > > > > > > How can I do it asynconistrically? > > > > > > It's simple code just open file, loop through line by line and do some > > comparons with the string. > > > > If all you want is to prevent Windows from displaying that message > > then I believe all you need to do is periodically call > > frame.update_idletasks() (or the equivalent if you're using some > > framework other than tkinter) so that the basic window events will get > > processed. -- https://mail.python.org/mailman/listinfo/python-list