this post was submitted on 28 Nov 2024
52 points (98.1% liked)

Open Source

31732 readers
140 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

also you can test pynotes and pyclock

all 6 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 3 weeks ago (1 children)

Cute! 😀

It mostly works. I think line 103 should maybe be:

os.remove(os.path.join(cdata, "teat.txt"))

So, "teat.txt" instead of "eat.txt". I think this prevents the cat from ever getting happy since that line causes an error and it never reaches image.set_from_file(os.path.join(current_dir, "data/happy.png")) which is very sad!

Actually, you may just want to catch the error if the file happens to not exist. Like this:

    try:
        os.remove(os.path.join(cdata, "teat.txt"))
    except FileNotFoundError:
        pass
[–] [email protected] 2 points 3 weeks ago (1 children)

nope. its work normal but thanks! also can you upgrade my game? i do some big upgrade!

[–] [email protected] 2 points 3 weeks ago

Oh, I see. You fixed that one in 1.2. That wasn't there yet when I commented. :)

Yeah, works great now!