scripts: Update graphing scripts to work with either python2 or python3

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-02 12:36:38 -04:00
parent a143921534
commit 4d5c619b8e
4 changed files with 8 additions and 8 deletions

View File

@ -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

View File

@ -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.

View File

@ -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>

View File

@ -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()