From 481eb9abfd42541d9587f785ebb9fca20af46a46 Mon Sep 17 00:00:00 2001 From: Dima YaFlay <93622229+YaFlay@users.noreply.github.com> Date: Mon, 3 Jan 2022 01:45:03 +0300 Subject: [PATCH] 1.0.1 Optimizing code, add installer --- index.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.py b/index.py index 58c02b6..84ca50e 100644 --- a/index.py +++ b/index.py @@ -1,13 +1,13 @@ from os import getcwd, system, path -import urllib.request as urlreq +from urllib.request import urlretrieve # import modules -def window_download(): - cwd = getcwd() - url = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/windows.py' - if not path.isfile('/windows.py'): urlreq.urlretrieve(url, str(cwd)+'/windows.py') - url2 = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/commands.py' - if not path.isfile('/commands.py'): urlreq.urlretrieve(url2, str(cwd)+'/commands.py') - system('python3 '+ str(cwd)+'/windows.py') +cwd = getcwd() +windows = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/windows.py' +if not path.isfile('/windows.py'): urlretrieve(windows, str(cwd)+'/windows.py') +commands = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating/main/commands.py' +if not path.isfile('/commands.py'): urlretrieve(commands, str(cwd)+'/commands.py') +installer = 'https://raw.githubusercontent.com/YaFlay/Minecraft_server_creating-BETA-/main/installer.py' +if not path.isfile('/installer.py'): urlretrieve(installer, str(cwd)+'/installer.py') +system('python3 '+ str(cwd)+'/windows.py') -window_download()