This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download executable file from the internet and run it | |
def run_online_exe(url, dir, exe, run=True): | |
# "Sanitize" input | |
if exe[-4:] != '.exe': | |
exe += '.exe' | |
# Download file as zip | |
from urllib.request import urlretrieve | |
zip_file_dir = exe.split('/')[-1][:-4] + '.zip' | |
urlretrieve(url, zip_file_dir) | |
# Unzip file |