Skip to content

Instantly share code, notes, and snippets.

@Haaruun-I
Haaruun-I / self-update-script.py
Last active August 12, 2018 22:58 — forked from gesquive/self-update-script.py
Stick this in a python script to self update the script from an online source
__version__ = "1"
def update(dl_url, force_update=False):
"""
Attempts to download the update url in order to find if an update is needed.
If an update is needed, the current script is backed up and the update is
saved in its place.
"""
import urllib
import re