diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5af4fe6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +build/* +dist/* +rel/* \ No newline at end of file diff --git a/RemotePlayTogetherHelper.exe.spec b/RemotePlayTogetherHelper.exe.spec new file mode 100644 index 0000000..931e1c3 --- /dev/null +++ b/RemotePlayTogetherHelper.exe.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis( + ['Scripts\\main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='RemotePlayTogetherHelper.exe', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/Scripts/const.py b/Scripts/const.py index 5557aab..6f13090 100644 --- a/Scripts/const.py +++ b/Scripts/const.py @@ -1,6 +1,7 @@ import sys from pathlib import Path + class Const: version = "1.0.0" updateurl = "https://raw.githubusercontent.com/tiuub/RemotePlayTogetherHelper/master/VERSION" @@ -26,4 +27,4 @@ class Const: settingsEnableUpdatesKey = "ENABLEUPDATES" settingsLastUpdatePollStampKey = "LASTUPDATEPOLLSTAMP" - settingsUpdateIntervalKey = "UPDATEINTERVAL" \ No newline at end of file + settingsUpdateIntervalKey = "UPDATEINTERVAL" diff --git a/Scripts/forms.py b/Scripts/forms.py index 4101b07..690e84f 100644 --- a/Scripts/forms.py +++ b/Scripts/forms.py @@ -4,6 +4,7 @@ import sys import time import datetime +import shlex from const import Const @@ -36,7 +37,9 @@ def showAddGame(self): if os.path.isfile(path): break self.printc(" Please enter a valid file.", Const.R) - self.games.addgame(name=name, path=path) + args = input( + " Enter any command-line args, or just press enter to skip: ") + self.games.addgame(name=name, path=path, args=args) def showAddedGame(self, name): self.cls() @@ -47,18 +50,37 @@ def showRenameGame(self, index): self.printc(" Additional commands:", Const.BB) self.printc("\tback or quit (Must be equals)", Const.BB) self.newline() - c = input(" Type in the new name for %s: " % (self.games.getname(index=index))) + c = input(" Type in the new name for %s: " % + (self.games.getname(index=index))) if c.lower() == "quit": sys.exit(0) elif c.lower() != "back": self.games.setname(index=index, name=c) + def showUpdateArgsGame(self, index): + self.cls() + self.printc(" Additional commands:", Const.BB) + self.printc("\tback or quit (Must be equals)", Const.BB) + self.newline() + self.printc( + f" Current args for {self.games.getname(index=index)}: {self.games.getargs(index=index)}") + c = input(" Type in the new args for %s: " % + (self.games.getname(index=index))) + if c.lower() == "quit": + sys.exit(0) + elif c.lower() != "back": + self.games.setargs(index=index, args=c) + def showDeleteGame(self, index): self.cls() self.printc(" Selected Game:") self.printc("\tID:\t%i" % (index + 1), Const.G) self.printc("\tName:\t%s" % self.games.getname(index=index), Const.G) - self.printc("\tPath:\t\"%s\"" % (self.games.getpath(index=index)), Const.BB) + self.printc("\tPath:\t\"%s\"" % + (self.games.getpath(index=index)), Const.BB) + if self.games.getargs(index=index): + self.printc( + f"\tArgs:\t{self.games.getargs(index=index)}", Const.BB) self.newline() c = input(Const.R + " Do you really want to delete \"%s\" (yes|no)?: " % ( @@ -75,25 +97,36 @@ def showGamelist(self, help=False): for i in range(0, len(games)): if self.games.gethost(index=i): - self.printc("\t[%i]\t%s [HOST]" % (i + 1, self.games.getname(index=i)), Const.G) + self.printc("\t[%i]\t%s [HOST]" % + (i + 1, self.games.getname(index=i)), Const.G) else: - self.printc("\t[%i]\t%s" % (i + 1, self.games.getname(index=i)), Const.G) + self.printc("\t[%i]\t%s" % + (i + 1, self.games.getname(index=i)), Const.G) self.newline() self.printc(" Additional commands:") - self.printc("\t[%i]\tAdd new game - Enter also \"add\"" % (len(games) + 1), Const.O) - self.printc("\t[%i]\tUninstall - Enter also \"uninstall\"" % (len(games) + 2), Const.O) - self.printc("\t[%i]\tSettings - Enter also \"settings\"" % (len(games) + 3), Const.O) - self.printc("\t[%i]\tQuit - Enter also \"quit\"" % (len(games) + 4), Const.O) - self.printc("\t[%i]\tHelp - Enter also \"help\"" % (len(games) + 5), Const.O) + self.printc("\t[%i]\tAdd new game - Enter also \"add\"" % + (len(games) + 1), Const.O) + self.printc("\t[%i]\tUninstall - Enter also \"uninstall\"" % + (len(games) + 2), Const.O) + self.printc("\t[%i]\tSettings - Enter also \"settings\"" % + (len(games) + 3), Const.O) + self.printc("\t[%i]\tQuit - Enter also \"quit\"" % + (len(games) + 4), Const.O) + self.printc("\t[%i]\tHelp - Enter also \"help\"" % + (len(games) + 5), Const.O) self.newline() if help: self.printc(" Help page:", Const.BB) - self.printc("\t\t\t- Entering the ID of a game, will select it", Const.BB) - self.printc("\tadd\t\t\t- Will provide a form, to easily add an game", Const.BB) - self.printc("\tuninstall\t- Will uninstall the Helper and all its data", Const.BB) - self.printc("\tquit\t\t- Will instantly close the application", Const.BB) + self.printc( + "\t\t\t- Entering the ID of a game, will select it", Const.BB) + self.printc( + "\tadd\t\t\t- Will provide a form, to easily add an game", Const.BB) + self.printc( + "\tuninstall\t- Will uninstall the Helper and all its data", Const.BB) + self.printc( + "\tquit\t\t- Will instantly close the application", Const.BB) while True: index = input(" Enter a number (1, 2, 3...): ").lower() @@ -126,14 +159,21 @@ def showGame(self, index): self.printc(" Selected Game:") self.printc("\tID:\t%i" % (index + 1), Const.G) self.printc("\tName:\t%s" % self.games.getname(index=index), Const.G) - self.printc("\tPath:\t\"%s\"" % self.games.getpath(index=index), Const.BB) + self.printc("\tPath:\t\"%s\"" % + self.games.getpath(index=index), Const.BB) + if self.games.getargs(index=index): + self.printc( + f"\tArgs:\t{self.games.getargs(index=index)}", Const.BB) self.newline() self.printc(" Choose a action:") self.printc("\t(s)tart\t\t- Will start the game", Const.G) + self.printc( + "\t(a)rgs\t\t- Will update command-line args for the game", Const.O) self.printc("\t(d)elete\t- Will remove the game from the list", Const.O) self.printc("\t(r)ename\t- Will rename the game", Const.O) self.printc("\t(b)ack\t\t- Will go back to the game selection", Const.O) - self.printc("\t(q)uit\t\t- Will instantly close the application", Const.O) + self.printc( + "\t(q)uit\t\t- Will instantly close the application", Const.O) self.newline() while True: @@ -141,6 +181,9 @@ def showGame(self, index): if action[0] == "s": self.showStartGame(index) break + elif action[0] == "a": + self.showUpdateArgsGame(index) + break elif action[0] == "d": self.showDeleteGame(index) break @@ -152,7 +195,8 @@ def showGame(self, index): elif action[0] == "q": sys.exit(0) else: - self.printc(" Wrong action! Please enter one of the given options!", Const.R) + self.printc( + " Wrong action! Please enter one of the given options!", Const.R) def showStartGame(self, index): self.cls() @@ -160,7 +204,12 @@ def showStartGame(self, index): if os.path.isfile(self.games.getpath(index=index)): path = Path(self.games.getpath(index=index)) os.chdir(path.parent) - subprocess.Popen([path.__str__()], stdin=None, stderr=None, close_fds=None) + if self.games.getargs(index=index): + subprocess.Popen([path.__str__()] + shlex.split(self.games.getargs(index=index)), stdin=None, + stderr=None, close_fds=None) + else: + subprocess.Popen([path.__str__()], stdin=None, + stderr=None, close_fds=None) sys.exit(0) ################## @@ -176,23 +225,28 @@ def showUninstall(self): hostgame = game break if hostgame is not None: - self.printc(" The hostgame %s will be moved back to its original folder." % hostgame["name"]) + self.printc( + " The hostgame %s will be moved back to its original folder." % hostgame["name"]) self.printc(" Current path:\t%s" % hostgame["path"], Const.O) self.printc(" New Path:\t%s" % Const.reldir, Const.G) self.newline() else: - self.printc(" No hostgame found. Cant restore the original game!", Const.R) + self.printc( + " No hostgame found. Cant restore the original game!", Const.R) self.newline() - self.printc(" The following folder an all its components will be deleted!:") + self.printc( + " The following folder an all its components will be deleted!:") self.printc(" %s" % Const.reldir, Const.R) for file in Const.reldir.rglob("*"): self.printc(" %s" % file.__str__(), Const.R) self.newline() self.printc(" Additional commands:") - self.printc("\tback - Will go back to the Gamelist and cancel the process", Const.O) - self.printc("\tquit - Will close the tool immediately and cancel the process", Const.O) + self.printc( + "\tback - Will go back to the Gamelist and cancel the process", Const.O) + self.printc( + "\tquit - Will close the tool immediately and cancel the process", Const.O) self.newline() while True: @@ -208,28 +262,29 @@ def showUninstall(self): modifiedpath = Path(hostgame["path"]) os.chdir(Const.reldir.parent) with open("%s/RemotePlayTogetherHelperUninstaller.bat" % path.__str__(), "w") as f: - f.write(("@echo off\r\n" \ - "echo This .bat file is written to the TEMP directory and will delete the RemotePlayTogetherHelper\r\n" \ - "timeout 5 /nobreak\r\n" \ - "echo. & echo Killing now the RemotePlayTogetherHelper task.\r\n" \ - "TASKKILL /F /pid {pid}\r\n" \ - "echo. & echo Deleting the RemotePlayTogetherHelper executable and all its components.\r\n" \ - "rmdir /Q /S \"{parentpath}\"\r\n" \ - + (("timeout 5 /nobreak\r\n" \ - "echo. & echo Moving the Host game back to the original folder.\r\n" \ + f.write(("@echo off\r\n" + "echo This .bat file is written to the TEMP directory and will delete the RemotePlayTogetherHelper\r\n" + "timeout 5 /nobreak\r\n" + "echo. & echo Killing now the RemotePlayTogetherHelper task.\r\n" + "TASKKILL /F /pid {pid}\r\n" + "echo. & echo Deleting the RemotePlayTogetherHelper executable and all its components.\r\n" + "rmdir /Q /S \"{parentpath}\"\r\n" + + (("timeout 5 /nobreak\r\n" + "echo. & echo Moving the Host game back to the original folder.\r\n" "move /Y \"{modifiedpath}\" \"{parentpath}\"\r\n").format(parentpath=Const.reldir, - modifiedpath=modifiedpath.parent) if hostgame is not None else "") \ - + "echo. & echo. & echo. & echo. & echo The RemotePlayTogetherHelper is now uninstalled!\r\n" \ - "echo. & echo. & echo. & Pause\r\n" \ - "echo. & echo Deleting now the uninstaller file itself. Ignore the following error message and press Enter or close the window.\r\n" \ - "DEL \"%~f0\"\r\n" \ + modifiedpath=modifiedpath.parent) if hostgame is not None else "") + + "echo. & echo. & echo. & echo. & echo The RemotePlayTogetherHelper is now uninstalled!\r\n" + "echo. & echo. & echo. & Pause\r\n" + "echo. & echo Deleting now the uninstaller file itself. Ignore the following error message and press Enter or close the window.\r\n" + "DEL \"%~f0\"\r\n" "Pause").format(pid=os.getpid(), parentpath=Const.reldir)) if os.path.isfile("%s/RemotePlayTogetherHelperUninstaller.bat" % path.__str__()): subprocess.Popen(["%s/RemotePlayTogetherHelperUninstaller.bat" % path.__str__()], shell=True, stdin=None, stderr=None, close_fds=None) sys.exit(0) else: - input(Const.R + " Error! Cant uninstall the Tool. Press Enter." + Const.W) + input( + Const.R + " Error! Cant uninstall the Tool. Press Enter." + Const.W) def showUpdate(self, force=False): self.cls() @@ -237,17 +292,21 @@ def showUpdate(self, force=False): self.newline() if self.settings.get(Const.settingsEnableUpdatesKey, True) or force: if (datetime.datetime.now() - datetime.datetime.fromtimestamp(float(self.settings.get(Const.settingsLastUpdatePollStampKey, 0)))).days >= int(self.settings.get(Const.settingsUpdateIntervalKey, 7)) or force: - self.settings.set(Const.settingsLastUpdatePollStampKey, datetime.datetime.now().timestamp()) + self.settings.set( + Const.settingsLastUpdatePollStampKey, datetime.datetime.now().timestamp()) if self.updater.poll(): - self.printc(" There is a new version of the tool available!", Const.G) + self.printc( + " There is a new version of the tool available!", Const.G) self.newline() - c = input(" Do you want to download the newer version (yes|no)?: ").lower() + c = input( + " Do you want to download the newer version (yes|no)?: ").lower() if c[0] == "y": self.newline() self.printc(" Updating the tool now!", Const.O) self.updater.update() else: - self.printc(" There is no newer version available!", Const.R) + self.printc( + " There is no newer version available!", Const.R) self.newline() def showSetup(self): @@ -255,9 +314,11 @@ def showSetup(self): c = input(" Do you want to use the setup guide (yes|no)?: ").lower() if c[0] == "y": self.newline() - self.printc(" To use this tool, you have to install a RemotePlayTogether compatibel game via steam.") + self.printc( + " To use this tool, you have to install a RemotePlayTogether compatibel game via steam.") self.newline() - self.printc(" If you have done this, please enter the complete path to the .exe of the game.") + self.printc( + " If you have done this, please enter the complete path to the .exe of the game.") self.printc(" Example: \"C:/Program Files (x86)/Steam/steamapps/common/Lego Batman/LEGBatman.exe\"", Const.BB) while True: @@ -268,9 +329,11 @@ def showSetup(self): elif path.lower()[0] == "q": sys.exit(0) else: - self.printc(" You have entered a wrong path. Look at the example.", Const.R) + self.printc( + " You have entered a wrong path. Look at the example.", Const.R) parentpath = Path(path).parent - modifiedpath = str(parentpath) + "RPTH_%s" % (time.strftime("%Y%m%d_%H%M%S")) + modifiedpath = str(parentpath) + \ + "RPTH_%s" % (time.strftime("%Y%m%d_%H%M%S")) os.rename(parentpath, modifiedpath) if not os.path.exists(parentpath): os.makedirs(parentpath) @@ -289,12 +352,15 @@ def showSetup(self): self.printc(" The manual installation process takes x steps.") self.printc( "\t1. Go to the files of a RemotePlayTogehter compatible game. Right click in Steam -> Properties -> Local files -> Browse local files.") - self.printc("\t2. Copy all the gamefiles to another place and remember the .exe name.") + self.printc( + "\t2. Copy all the gamefiles to another place and remember the .exe name.") self.printc( "\t3. Copy the RemotePlayTogether.exe to the emptied folder of the game and rename it like the remembered .exe name.") - self.printc("\t4. Open the renamed .exe, type in \"no\" and press Enter afterwards.") + self.printc( + "\t4. Open the renamed .exe, type in \"no\" and press Enter afterwards.") self.printc("\t5. Now you can add games to the list.") - self.printc("\t6. To use it, go into Steam to the Game you choose at beginning and press Play.") + self.printc( + "\t6. To use it, go into Steam to the Game you choose at beginning and press Play.") self.printc("\t7. You can close this guide now.") input("Press Enter to continue...") @@ -307,9 +373,12 @@ def showSettings(self): self.cls() self.printc(" Settings:") self.newline() - self.printc("\t[1] Enable updates (1=Yes|0=No):\t%i" % self.settings.get(Const.settingsEnableUpdatesKey, 1), Const.G) - self.printc("\t[2] Update interval (in days):\t\t%i" % self.settings.get(Const.settingsUpdateIntervalKey, 2), Const.G) - self.printc("\t[3] Last update poll (read only):\t%s" % datetime.datetime.fromtimestamp(float(self.settings.get(Const.settingsLastUpdatePollStampKey, 0))).strftime("%Y-%m-%d %H:%M:%S"), Const.G) + self.printc("\t[1] Enable updates (1=Yes|0=No):\t%i" % self.settings.get( + Const.settingsEnableUpdatesKey, 1), Const.G) + self.printc("\t[2] Update interval (in days):\t\t%i" % self.settings.get( + Const.settingsUpdateIntervalKey, 2), Const.G) + self.printc("\t[3] Last update poll (read only):\t%s" % datetime.datetime.fromtimestamp(float( + self.settings.get(Const.settingsLastUpdatePollStampKey, 0))).strftime("%Y-%m-%d %H:%M:%S"), Const.G) self.printc("\t[4] Checking for updates", Const.G) self.newline() self.printc(" Additional commands:") @@ -326,18 +395,23 @@ def showSettings(self): break elif c.isdigit() and int(c) == 1: while True: - c = input(" Enter 1 for enabling or 0 for disabling updates: ") + c = input( + " Enter 1 for enabling or 0 for disabling updates: ") if c.isdigit() and 0 <= int(c) <= 1: - self.settings.set(Const.settingsEnableUpdatesKey, int(c)) + self.settings.set( + Const.settingsEnableUpdatesKey, int(c)) break elif c.isdigit() and int(c) == 2: while True: - c = input(" Enter a value for the update interval (in days): ") + c = input( + " Enter a value for the update interval (in days): ") if c.isdigit() and 0 <= int(c): - self.settings.set(Const.settingsUpdateIntervalKey, int(c)) + self.settings.set( + Const.settingsUpdateIntervalKey, int(c)) break elif c.isdigit() and int(c) == 4: self.showUpdate(force=True) input(" Press Enter to continue...") else: - self.printc(" Please enter a valid number or type quit or back!", Const.R) \ No newline at end of file + self.printc( + " Please enter a valid number or type quit or back!", Const.R) diff --git a/Scripts/games.py b/Scripts/games.py index 799c544..06b41a4 100644 --- a/Scripts/games.py +++ b/Scripts/games.py @@ -1,6 +1,7 @@ import json import os + class Games: games = [] @@ -21,8 +22,8 @@ def savegames(self): return True return False - def addgame(self, name, path, host=False): - game = { "name": name, "path": path, "host": host } + def addgame(self, name, path, host=False, args=''): + game = {"name": name, "path": path, "host": host, "args": args} self.games.append(game) if self.savegames(): return True @@ -50,6 +51,11 @@ def gethost(self, index): return self.games[index]["host"] return False + def getargs(self, index): + if 0 <= index < len(self.games) and "args" in self.games[index]: + return self.games[index]["args"] + return False + def setname(self, index, name): if 0 <= index < len(self.games) and "name" in self.games[index]: self.games[index]["name"] = name @@ -70,3 +76,10 @@ def sethost(self, index, host): if self.savegames(): return True return False + + def setargs(self, index, args): + if 0 <= index < len(self.games) and "args" in self.games[index]: + self.games[index]["args"] = args + if self.savegames(): + return True + return False diff --git a/Scripts/main.py b/Scripts/main.py index 6102356..521991d 100644 --- a/Scripts/main.py +++ b/Scripts/main.py @@ -41,4 +41,4 @@ while True: forms.showGamelist() -# C:\Python\Python3.7.2\Scripts\pyinstaller.exe --onefile main.py \ No newline at end of file +# C:\Python\Python3.7.2\Scripts\pyinstaller.exe --onefile main.py diff --git a/Scripts/updater.py b/Scripts/updater.py index 593220b..6609b1b 100644 --- a/Scripts/updater.py +++ b/Scripts/updater.py @@ -30,7 +30,8 @@ def poll(self): if r.status_code == 200: self.rawresponse = r.text - self.printc(" Local version: %s - Newes version: %s" % (self.version, r.text.split(":")[0]), self.B) + self.printc(" Local version: %s - Newes version: %s" % + (self.version, r.text.split(":")[0]), self.B) self.printc() if version.parse(r.text.split(":")[0]) > version.parse(self.version): return True @@ -46,12 +47,15 @@ def update(self): if re.fullmatch("([0-9\.]+(alpha|beta|dev)?)(:)((http[s]?|ftp)://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)", self.rawresponse.rstrip()) is not None: self.printc() - self.printc(" New version: %s" % self.rawresponse.split(":")[0], self.G) + self.printc(" New version: %s" % + self.rawresponse.split(":")[0], self.G) self.printc() self.printc(" Downloading the newer version. (May take a while.)") - r = requests.get(str.join(":", self.rawresponse.split(":")[1:]).rstrip()) + r = requests.get( + str.join(":", self.rawresponse.split(":")[1:]).rstrip()) if r.status_code == 200: - tmpexepath = Path("%s/%s.%s.%s" % (os.getenv("TEMP"), Path(sys.executable).name, time.strftime("%Y%m%d_%H%M%S"), "tmp")) + tmpexepath = Path("%s/%s.%s.%s" % (os.getenv("TEMP"), Path( + sys.executable).name, time.strftime("%Y%m%d_%H%M%S"), "tmp")) self.printc(" Downloaded the newer version.") self.printc(" Writing it to a temp directory.") with open(tmpexepath, 'wb') as f: @@ -64,29 +68,32 @@ def update(self): batchpath = Path( "%s/%s.%s.%s" % (os.getenv("TEMP"), "PythonUpdater", time.strftime("%Y%m%d_%H%M%S"), "bat")) with open(batchpath.__str__(), "w") as f: - f.write(("@echo off\r\n" \ - "echo This batch script will switch the old with the new file.\r\n" \ - "timeout 5 /nobreak\r\n" \ - "echo. & echo Killing now the running task.\r\n" \ - "TASKKILL /F /pid {pid}\r\n" \ - "echo. & echo Deleting the old file.\r\n" \ - "DEL \"{exepath}\"\r\n" \ - "timeout 3 /nobreak\r\n" \ - "echo. & echo Moving the new file to the old location.\r\n" \ + f.write(("@echo off\r\n" + "echo This batch script will switch the old with the new file.\r\n" + "timeout 5 /nobreak\r\n" + "echo. & echo Killing now the running task.\r\n" + "TASKKILL /F /pid {pid}\r\n" + "echo. & echo Deleting the old file.\r\n" + "DEL \"{exepath}\"\r\n" + "timeout 3 /nobreak\r\n" + "echo. & echo Moving the new file to the old location.\r\n" "move \"{tmpexepath}\" \"{exepath}\"\r\n" - "timeout 3 /nobreak\r\n" \ - "echo. & echo Starting the new version!\r\n" \ - "start \"{exepath}\" \"{exepath}\"\r\n" \ - "echo. & echo The update is now finished. Ignore the following error message and press Enter or close the window.\r\n" \ - "DEL \"%~f0\"\r\n" \ + "timeout 3 /nobreak\r\n" + "echo. & echo Starting the new version!\r\n" + "start \"{exepath}\" \"{exepath}\"\r\n" + "echo. & echo The update is now finished. Ignore the following error message and press Enter or close the window.\r\n" + "DEL \"%~f0\"\r\n" "Pause\r\n").format(pid=os.getpid(), exepath=sys.executable, tmpexepath=tmpexepath)) if os.path.isfile(batchpath.__str__()): subprocess.Popen([batchpath.__str__()], shell=True, stdin=None, stderr=None, close_fds=None) sys.exit(0) else: - self.printc(" There happened an error, during calling the batch script.", self.R) + self.printc( + " There happened an error, during calling the batch script.", self.R) else: - self.printc(" There was an error, during downloading the new version.", self.R) + self.printc( + " There was an error, during downloading the new version.", self.R) else: - self.printc(" There was an error, during fetching the version.", self.R) + self.printc( + " There was an error, during fetching the version.", self.R)