aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-08-02 12:36:38 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-08-02 12:44:05 -0400
commit4d5c619b8eb7aa530a87304cc26734f42e2d2b0d (patch)
tree8e54947faf4bc399cdcea1425c2f6b77dbd096c9
parenta143921534e6d1ba1e62f7dafe185a97f0e7f9a2 (diff)
downloadkutter-4d5c619b8eb7aa530a87304cc26734f42e2d2b0d.tar.gz
kutter-4d5c619b8eb7aa530a87304cc26734f42e2d2b0d.tar.xz
kutter-4d5c619b8eb7aa530a87304cc26734f42e2d2b0d.zip
scripts: Update graphing scripts to work with either python2 or python3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rwxr-xr-xscripts/graph_extruder.py4
-rwxr-xr-xscripts/graph_motion.py4
-rwxr-xr-xscripts/graph_shaper.py2
-rwxr-xr-xscripts/graphstats.py6
4 files changed, 8 insertions, 8 deletions
diff --git a/scripts/graph_extruder.py b/scripts/graph_extruder.py
index 241f727f..6f31ed3c 100755
--- a/scripts/graph_extruder.py
+++ b/scripts/graph_extruder.py
@@ -1,7 +1,7 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
# Generate extruder pressure advance motion graphs
#
-# Copyright (C) 2019-2020 Kevin O'Connor <kevin@koconnor.net>
+# Copyright (C) 2019-2021 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import math, optparse, datetime
diff --git a/scripts/graph_motion.py b/scripts/graph_motion.py
index 29a5410b..0520343f 100755
--- a/scripts/graph_motion.py
+++ b/scripts/graph_motion.py
@@ -1,7 +1,7 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
# Script to graph motion results
#
-# Copyright (C) 2019-2020 Kevin O'Connor <kevin@koconnor.net>
+# Copyright (C) 2019-2021 Kevin O'Connor <kevin@koconnor.net>
# Copyright (C) 2020 Dmitry Butyugin <dmbutyugin@google.com>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
diff --git a/scripts/graph_shaper.py b/scripts/graph_shaper.py
index bf94afc1..0ea19458 100755
--- a/scripts/graph_shaper.py
+++ b/scripts/graph_shaper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
# Script to plot input shapers
#
# Copyright (C) 2020 Kevin O'Connor <kevin@koconnor.net>
diff --git a/scripts/graphstats.py b/scripts/graphstats.py
index d9915036..b00477f9 100755
--- a/scripts/graphstats.py
+++ b/scripts/graphstats.py
@@ -1,7 +1,7 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python
# Script to parse a logging file, extract the stats, and graph them
#
-# Copyright (C) 2016-2019 Kevin O'Connor <kevin@koconnor.net>
+# Copyright (C) 2016-2021 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import optparse, datetime
@@ -23,7 +23,7 @@ def parse_log(logname, mcu):
mcu = "mcu"
mcu_prefix = mcu + ":"
apply_prefix = { p: 1 for p in APPLY_PREFIX }
- f = open(logname, 'rb')
+ f = open(logname, 'r')
out = []
for line in f:
parts = line.split()