Skip to content

Instantly share code, notes, and snippets.

View 0n1udra's full-sized avatar

0n1udra 0n1udra

  • NH, USA
  • 10:18 (UTC -04:00)
View GitHub Profile
@gesquive
gesquive / self-update-script.py
Last active May 28, 2024 23:23
Stick this in a python script to self update the script from an online source
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
from subprocess import call
def compare_versions(vA, vB):