Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Alan Gauld
On 25/10/12 19:15, myles broomes wrote: but according to my program, the seperate file is empty when I know it clearly isn't. OK, So show us the program! Otherwise we are just guessing. Python Shell, it does the same thing. I open it in read mode and assign to a variable like so: scoresFil

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Steven D'Aprano
On 26/10/12 05:15, myles broomes wrote: I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents: 120 74 57 44 12 I thought that maybe the problem was the

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread bob gailer
On 10/25/2012 2:15 PM, myles broomes wrote: [snip] Try open('highScores.txt, 'rb'). -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinf

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Mark Lawrence
On 25/10/2012 19:26, Joel Goldstick wrote: On Thu, Oct 25, 2012 at 2:15 PM, myles broomes wrote: I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Mark Lawrence
On 25/10/2012 19:15, myles broomes wrote: I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents: 120 74 57 44 12 I thought that maybe the problem was

Re: [Tutor] Reading from a seperate file

2012-10-25 Thread Joel Goldstick
On Thu, Oct 25, 2012 at 2:15 PM, myles broomes wrote: > > I'm trying to code a program that retrieves data from a seperate file but > according to my program, the seperate file is empty when I know it clearly > isn't. It's a txt file and here are its contents: > > 120 > 74 > 57 > 44 > 12 > > I tho

[Tutor] Reading from a seperate file

2012-10-25 Thread myles broomes
I'm trying to code a program that retrieves data from a seperate file but according to my program, the seperate file is empty when I know it clearly isn't. It's a txt file and here are its contents: 120 74 57 44 12 I thought that maybe the problem was the code I had written but even when I try