- install
pythonanywhere
with pip - run this file
- put the log file names in the prompt one-by-one
- you are done!
NOTE: you need to run the file in a pythonanywhere console otherwise it will break.
import pythonanywhere.api | |
import getpass | |
while True: | |
url = pythonanywhere.api.get_api_endpoint().format( | |
username=getpass.getuser(), flavor="files" | |
) + "path/var/log/{name}/".format( | |
name=input("Logfile name: ") | |
) | |
response = pythonanywhere.api.call_api(url, "delete") |