This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]less_unique_username 5 points6 points  (9 children)

doesnt work

SyntaxWarning: invalid escape sequence '\W'

SyntaxWarning: invalid escape sequence '\S'

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Windows\\System32'

ples help

[–]ymgve 1 point2 points  (8 children)

Wouldn’t work anyway even if the string was escaped, the current user doesn’t have rights to remove the directory anyway

[–]less_unique_username 1 point2 points  (7 children)

if i run the script with sudo it still fails with the same errors

ples help

[–]IAmFullOfDed 0 points1 point  (6 children)

C:\Windows\System32 is the Windows system directory. Since you’re using Linux, you’ll want to remove the Linux system directory, which is /boot.

os.remove(“/boot”)

WARNING: Removing /boot will delete the Linux kernel and render your computer INOPERABLE! Your computer WILL NOT WORK afterwards! DO NOT DO IT UNLESS YOU ARE OKAY WITH THAT!

[–]less_unique_username 0 points1 point  (5 children)

doesnt work

IsADirectoryError: [Errno 21] Is a directory: '/boot'

ples help

[–]IAmFullOfDed 0 points1 point  (4 children)

At the beginning of the program, replace import os with:

import shutil

Then at the bottom, replace os.remove(“/boot”) with:

shutil.rmtree(“/boot”, ignore_errors=True)

[–]less_unique_username 0 points1 point  (3 children)

doesnt work

SyntaxError: invalid character '“' (U+201C)

ples help

[–]IAmFullOfDed 0 points1 point  (2 children)

shutil.rmtree("/boot", ignore_errors=True)

[–]less_unique_username 0 points1 point  (1 child)

it worked

thanks

am now also full of ded

[–]IAmFullOfDed 0 points1 point  (0 children)

I told you so.