this post was submitted on 18 Jul 2025
329 points (96.9% liked)

Programmer Humor

25098 readers
1725 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] LostXOR@fedia.io 37 points 1 day ago (1 children)

IsADirectoryError: [Errno 21] Is a directory: 'C:\Windows\System32'

At least use shutil.rmtree for some semblance of possibility.

[–] ChaoticNeutralCzech@feddit.org 15 points 1 day ago (1 children)

Also, the backslashes need to be escaped I believe

[–] brucethemoose@lemmy.world 3 points 1 day ago (1 children)

Or just use forward slashes like someone sane!

[–] ChaoticNeutralCzech@feddit.org 1 points 15 hours ago

You're right, I forgot Python makes them work on Windows too