From bada72a01cbec5c44d5635117d3e05736ccdc0a5 Mon Sep 17 00:00:00 2001 From: Ton van Overbeek Date: Tue, 15 Feb 2022 22:17:48 +0100 Subject: [PATCH] more Python 3 integer division --- bin/flick-armcontrol | 6 +++--- bin/flick-snail | 4 ++-- bin/flick-volctrl | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/flick-armcontrol b/bin/flick-armcontrol index a511c35..c242184 100644 --- a/bin/flick-armcontrol +++ b/bin/flick-armcontrol @@ -107,9 +107,9 @@ def main(stdscr): exittxt = 'Control-C to exit' title = '**** Maplin Robotic Arm Control ****' Instr = '**** Instructions ****' - stdscr.addstr( 0, (curses.COLS - len(title)) / 2, title) - stdscr.addstr( 9, (curses.COLS - len(exittxt)) / 2, exittxt) - stdscr.addstr( 11, (curses.COLS - len(Instr)) / 2, Instr) + stdscr.addstr( 0, (curses.COLS - len(title)) // 2, title) + stdscr.addstr( 9, (curses.COLS - len(exittxt)) // 2, exittxt) + stdscr.addstr( 11, (curses.COLS - len(Instr)) // 2, Instr) stdscr.refresh() datawin = curses.newwin( 6, curses.COLS - 6, 2, 3) diff --git a/bin/flick-snail b/bin/flick-snail index bac8117..b15a5a6 100644 --- a/bin/flick-snail +++ b/bin/flick-snail @@ -51,8 +51,8 @@ def main(stdscr): # Add title and footer exittxt = 'Control-C to exit' title = '**** Flick Demo ****' - stdscr.addstr( 0, (curses.COLS - len(title)) / 2, title) - stdscr.addstr(22, (curses.COLS - len(exittxt)) / 2, exittxt) + stdscr.addstr( 0, (curses.COLS - len(title)) // 2, title) + stdscr.addstr(22, (curses.COLS - len(exittxt)) // 2, exittxt) stdscr.refresh() datawin = curses.newwin( 8, curses.COLS - 6, 2, 3) diff --git a/bin/flick-volctrl b/bin/flick-volctrl index 84b1edd..b96a4c7 100644 --- a/bin/flick-volctrl +++ b/bin/flick-volctrl @@ -40,9 +40,9 @@ def main(stdscr): exittxt = 'Control-C to exit' errortxt = '' title = '**** Volume control ****' - stdscr.addstr( 0, (curses.COLS - len(title)) / 2, title) - stdscr.addstr(10, (curses.COLS - len(exittxt)) / 2, exittxt) - stdscr.addstr(22, (0 - len(errortxt)) / 2, errortxt) + stdscr.addstr( 0, (curses.COLS - len(title)) // 2, title) + stdscr.addstr(10, (curses.COLS - len(exittxt)) // 2, exittxt) + stdscr.addstr(22, (0 - len(errortxt)) // 2, errortxt) stdscr.refresh() # Setup the mixer