From 1a628528ccb8b17c917e94ec6e99d20df8370df3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 29 Jan 2025 12:28:16 +1100 Subject: [PATCH] mark examples and core modules as python3 --- CSVReader.py | 2 +- examples/apmsetrate.py | 2 +- examples/bwtest.py | 2 +- examples/combine_logs.py | 2 +- examples/magtest.py | 2 +- examples/mav_accel.py | 2 +- examples/mav_replay_estimator.py | 2 +- examples/mavtcpsniff.py | 2 +- examples/mavtest.py | 2 +- examples/mavtester.py | 2 +- examples/rewrite_log.py | 2 +- examples/status_msg.py | 2 +- examples/wptogpx.py | 2 +- fgFDM.py | 2 +- mavexpression.py | 2 +- mavextra.py | 2 +- mavftpfs.py | 2 +- mavtestgen.py | 2 +- mavutil.py | 4 ++-- quaternion.py | 2 +- rotmat.py | 2 +- 21 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CSVReader.py b/CSVReader.py index a9a5522e5..1a5d19bff 100644 --- a/CSVReader.py +++ b/CSVReader.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' CSV log file reader diff --git a/examples/apmsetrate.py b/examples/apmsetrate.py index 51a9237d6..b9f5e5cca 100755 --- a/examples/apmsetrate.py +++ b/examples/apmsetrate.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' set stream rate on an APM diff --git a/examples/bwtest.py b/examples/bwtest.py index fa9ec29b1..25822e91c 100755 --- a/examples/bwtest.py +++ b/examples/bwtest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' check bandwidth of link diff --git a/examples/combine_logs.py b/examples/combine_logs.py index 6e0931d85..f9c787d29 100755 --- a/examples/combine_logs.py +++ b/examples/combine_logs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' merge 2 logs into a 3rd log, mapping some messages from LOG2 to new message names diff --git a/examples/magtest.py b/examples/magtest.py index c2582fa13..2160520db 100755 --- a/examples/magtest.py +++ b/examples/magtest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' rotate APMs on bench to test magnetometers diff --git a/examples/mav_accel.py b/examples/mav_accel.py index 999f2f3f6..2b50f8c68 100755 --- a/examples/mav_accel.py +++ b/examples/mav_accel.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' show accel calibration for a set of logs diff --git a/examples/mav_replay_estimator.py b/examples/mav_replay_estimator.py index 03b722cb1..0ef852fb9 100755 --- a/examples/mav_replay_estimator.py +++ b/examples/mav_replay_estimator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' estimate attitude from an ArduPilot replay log using a python state estimator diff --git a/examples/mavtcpsniff.py b/examples/mavtcpsniff.py index cebd4f715..b4fb929cd 100755 --- a/examples/mavtcpsniff.py +++ b/examples/mavtcpsniff.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' connect as a client to two tcpip ports on localhost with mavlink packets. pass them both directions, and show packets in human-readable format on-screen. diff --git a/examples/mavtest.py b/examples/mavtest.py index df667b907..bcebb59fd 100755 --- a/examples/mavtest.py +++ b/examples/mavtest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ Generate a message using different MAVLink versions, put in a buffer and then read from it. diff --git a/examples/mavtester.py b/examples/mavtester.py index 1ebe39e1d..07b1359f7 100755 --- a/examples/mavtester.py +++ b/examples/mavtester.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' test mavlink messages diff --git a/examples/rewrite_log.py b/examples/rewrite_log.py index 2ce9fdcd5..cdcb97228 100755 --- a/examples/rewrite_log.py +++ b/examples/rewrite_log.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' example of rewriting a log with changed values diff --git a/examples/status_msg.py b/examples/status_msg.py index c3f16ce4c..0bb1e00dc 100644 --- a/examples/status_msg.py +++ b/examples/status_msg.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' Print flight controller banner statustext messages and AUTOPILOT_VERSION message information. diff --git a/examples/wptogpx.py b/examples/wptogpx.py index d9da44199..6baebef65 100755 --- a/examples/wptogpx.py +++ b/examples/wptogpx.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' example program to extract GPS data from a waypoint file, and create a GPX diff --git a/fgFDM.py b/fgFDM.py index 39c6cd584..6af9bae9b 100644 --- a/fgFDM.py +++ b/fgFDM.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # parse and construct FlightGear NET FDM packets # Andrew Tridgell, November 2011 # released under GNU GPL version 2 or later diff --git a/mavexpression.py b/mavexpression.py index 5c56372af..42300add0 100644 --- a/mavexpression.py +++ b/mavexpression.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' mavlink expression evaluation functions diff --git a/mavextra.py b/mavextra.py index a959c28ff..ca08f4584 100644 --- a/mavextra.py +++ b/mavextra.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' useful extra functions for use by mavlink clients diff --git a/mavftpfs.py b/mavftpfs.py index 4f49e3ae2..5f4528408 100755 --- a/mavftpfs.py +++ b/mavftpfs.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import errno import os diff --git a/mavtestgen.py b/mavtestgen.py index 6876e6541..f8757cf3a 100755 --- a/mavtestgen.py +++ b/mavtestgen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' generate a MAVLink test suite diff --git a/mavutil.py b/mavutil.py index 3cdc0cb7e..17bfd6182 100644 --- a/mavutil.py +++ b/mavutil.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 ''' mavlink python utility functions @@ -2715,4 +2715,4 @@ def dump_message_verbose(f, m): if __name__ == '__main__': serial_list = auto_detect_serial(preferred_list=['*FTDI*',"*Arduino_Mega_2560*", "*3D_Robotics*", "*USB_to_UART*", '*PX4*', '*FMU*']) for port in serial_list: - print("%s" % port) + print("%s" % port) \ No newline at end of file diff --git a/quaternion.py b/quaternion.py index dfe22fc33..f20023369 100644 --- a/quaternion.py +++ b/quaternion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 """ diff --git a/rotmat.py b/rotmat.py index b9ee4a8f8..5de84ce85 100755 --- a/rotmat.py +++ b/rotmat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # vector3 and rotation matrix classes # This follows the conventions in the ArduPilot code,