Python Noob, open file dialog

2014-06-17 Thread cutey Love
My first attempt at Python, I'm using Tkinter and all is going well except when I'm using file_path = tkFileDialog.askopenfilename() print "test" opens great and lets me select a file, the problem is it then pauses? instead of continuing with the function? until I close, then it goes a

Re: Python Noob, open file dialog

2014-06-18 Thread cutey Love
No it's still paused after selection and only excutes when the window is closed. On Tuesday, June 17, 2014 6:34:41 PM UTC+1, MRAB wrote: > On 2014-06-17 17:49, cutey Love wrote: > > > My first attempt at Python, > > > > > > I'm using Tkinter and

Re: Python Noob, open file dialog

2014-06-18 Thread cutey Love
I'm on windows, I'm going to uninstall python and reinstall On Wednesday, June 18, 2014 9:32:40 AM UTC+1, alister wrote: > On Wed, 18 Jun 2014 00:36:29 -0700, cutey Love wrote: > > > > > No it's still paused after selection and only excutes when the window is

Not Responding When Dealing with Large Data

2014-06-18 Thread cutey Love
I'm trying to read in 10 lines of text, use some functions to edit them and then return a new list. The problem is my program always goes not responding when the amount of lines are a high number. I don't care how long the program takes to work, just need it to stop crashing? -- https://ma

Re: Not Responding When Dealing with Large Data

2014-06-18 Thread cutey Love
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. On Wednesday, June 18, 2014 6:20:13 PM UTC+1, c

Python Fails to Write to File

2014-06-18 Thread cutey Love
I'm trying to write data to a text file But I'm getting the error: TypeError: invalid file: <_io.TextIOWrapper Code is def saveFile(): file_path = filedialog.asksaveasfile(mode='w', filetypes=[('text files', '.txt')], defaultextension=".txt") fo = open(file_path, 'w') for e

Re: Python Fails to Write to File

2014-06-19 Thread cutey Love
Thank you very much, that fixed it. On Thursday, June 19, 2014 12:03:43 AM UTC+1, cutey Love wrote: > I'm trying to write data to a text file > > > > But I'm getting the error: > > > > TypeError: invalid file: <_io.TextIOWrapper >

Re: Not Responding When Dealing with Large Data

2014-06-19 Thread cutey Love
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 wrote: > > > Hi, thanks for the replies, > > > > > > I mean windows displays "Not responding close the program now" > >