Share your repls and programming experiences

← Back to all posts
Highscore file system in python
LardBoi

I promised to do this a while back but then I found out my c++ highscore file system (which this is based off of) is faulty when I was testing it so then I got a little disappointed. A couple of weeks pass and I'm thinking about the C++ one and fix it so now I finally studied up on my python again and here it is

Voters
Stephen_Chien
sandrew588
CSharpIsGud
LardBoi
Comments
hotnewtop
DrAvery

I think this would be much better with a json.dump() system worked into, that way you can put names, dates, scores, etc. and then read, print or do other things with that info. The way your script works now, is that it writes over the existing data.

Just a though/suggestion,
Dr. Avery

LardBoi

@DrAvery not gonna lie, I would if I knew how to do all of those things. Which I'm sure with a bit of research I could get the basics of it. I'm just more of a hardware and C/C++ guy than scripting and python and JSON stuff.

DrAvery

@LardBoi, Yeah, I completely respect that. I just like thinking about how things can be improved. :3

k4t3xpl0si0n

https://storage.googleapis.com/replit/images/1533896640072_462704201e3a7bb80667afbd0d672ff7.pn very cool

LardBoi

@k4t3xpl0si0n Thank you @k4t3xpl0si0n, very nice!

HarveyH

Your repl doesn't work...
https://storage.googleapis.com/replit/images/1533639838028_4f9ece4c7cb1992de766014b798b87ce.pn

LardBoi

@HarveyH It does for me I'm thinking it's the fact that my code is talking to a file and repl doesn't automatically create one if it doesn't exist like an OS would. Try clicking on open in repl.it in the top right corner. That seemed to make it work. Let me know if you're still having this issue