From b53bacabf98bc958ab0eed3ad2f59cced7a0863e Mon Sep 17 00:00:00 2001 From: Balakov Date: Thu, 30 Apr 2020 21:38:31 +0100 Subject: [PATCH] Fix fast USB polling script "print" syntax Running the USB polling script gives the error "SyntaxError: Missing parenthesis in call to 'print'. I've added the parenthesis. --- other_authors/fast_USB_polling_off.sh | 16 ++++++++-------- other_authors/fast_USB_polling_on.sh | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/other_authors/fast_USB_polling_off.sh b/other_authors/fast_USB_polling_off.sh index 7d1ac25..7e7f0d5 100644 --- a/other_authors/fast_USB_polling_off.sh +++ b/other_authors/fast_USB_polling_off.sh @@ -21,13 +21,13 @@ import os import sys import time -import re +import re from os import path -UBOOT_PATH = "/media/fat/linux/u-boot.txt" +UBOOT_PATH = "/media/fat/linux/u-boot.txt" if os.uname()[1] != "MiSTer": - print "This script must be run on a MiSTer system." + print ("This script must be run on a MiSTer system.") sys.exit(1) if path.exists(UBOOT_PATH): @@ -47,29 +47,29 @@ if path.exists(UBOOT_PATH): for l in lines_out: file.write(l + "\n") file.write("v=loglevel=4 usbhid.jspoll=0 xpad.cpoll=0\n") - + else: with open("/media/fat/linux/u-boot.txt","w") as file: file.write("v=loglevel=4 usbhid.jspoll=0 xpad.cpoll=0\n") os.system("clear") -print """ +print (""" Fast USB polling is OFF and will be inactive after reboot. Rebooting in: -""", +""") time.sleep(2) t = 5 while t > 0: - print "...%x" % t + print ("...%x" % t) t -= 1 time.sleep(1) -print "...NOW!" +print ("...NOW!") os.system("reboot") time.sleep(10) # Reboot without showing "Press any key..." diff --git a/other_authors/fast_USB_polling_on.sh b/other_authors/fast_USB_polling_on.sh index 4f7d61b..d317df6 100644 --- a/other_authors/fast_USB_polling_on.sh +++ b/other_authors/fast_USB_polling_on.sh @@ -21,13 +21,13 @@ import os import sys import time -import re +import re from os import path -UBOOT_PATH = "/media/fat/linux/u-boot.txt" +UBOOT_PATH = "/media/fat/linux/u-boot.txt" if os.uname()[1] != "MiSTer": - print "This script must be run on a MiSTer system." + print ("This script must be run on a MiSTer system.") sys.exit(1) if path.exists(UBOOT_PATH): @@ -47,31 +47,31 @@ if path.exists(UBOOT_PATH): for l in lines_out: file.write(l + "\n") file.write("v=loglevel=4 usbhid.jspoll=1 xpad.cpoll=1\n") - + else: with open("/media/fat/linux/u-boot.txt","w") as file: file.write("v=loglevel=4 usbhid.jspoll=1 xpad.cpoll=1\n") os.system("clear") -print """ +print (""" Fast USB polling is ON and will be active after reboot. This will force 1000hz polling on all gamepads and joysticks! If you have any input issues, please run fast_USB_polling_off.sh Rebooting in: -""", +""") time.sleep(2) t = 5 while t > 0: - print "...%x" % t + print ("...%x" % t) t -= 1 time.sleep(1) -print "...NOW!" +print ("...NOW!") os.system("reboot") time.sleep(10) # Reboot without showing "Press any key..."