Bruno Desthuilliers a écrit :
(snip)
> # hiscores.py
> import sys
>
> def _read_scores(path):
> f = open(path)
> # we don't expect a huge file so it's simpler to
> # read it all in memory
> lines = f.readlines()
> f.close()
>
> scores = []
> for line in filter(None, ma
Shawn Minisall a écrit :
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program.
> If it doesn, it creates one. That part is working fine. The problem is
> arising when it goes to read in the high scores f
On Sat, 08 Dec 2007 13:32:08 -0500, Shawn Minisall wrote:
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program. If
> it doesn, it creates one. That part is working fine. The problem is
> arising when it goe
On Dec 8, 10:07 pm, Chris <[EMAIL PROTECTED]> wrote:
> On Dec 8, 8:32 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm writing a game that uses two functions to check and see if a file
> > called highScoresList.txt exists in the main dir of the game program.
> > If it doesn, it creates o
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program.
> If it doesn, it creates one. That part is working fine. The problem is
> arising when it goes to read in the high scores from the file when I
On Dec 8, 8:32 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote:
> I'm writing a game that uses two functions to check and see if a file
> called highScoresList.txt exists in the main dir of the game program.
> If it doesn, it creates one. That part is working fine. The problem is
> arising when it g
I'm writing a game that uses two functions to check and see if a file
called highScoresList.txt exists in the main dir of the game program.
If it doesn, it creates one. That part is working fine. The problem is
arising when it goes to read in the high scores from the file when I
play again.
I'm writing a game that uses two functions to check and see if a file
called highScoresList.txt exists in the main dir of the game program.
If it doesn, it creates one. That part is working fine. The problem is
arising when it goes to read in the high scores from the file when I
play again.