Answer the question
In order to leave comments, you need to log in
How to implement python program uninstall?
Good day! I made a comic python file that does not do much harm, but I don’t know how to implement self-destruction of this script after launch! How to do it? To avoid further transfer of the script to other people.
Answer the question
In order to leave comments, you need to log in
Use the os module.
Import: import os
And to delete use:
os.remove(__ file__) #__ file__ это имя файла который вы запустили и оно будет использоваться для удаления
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question