This MAVLink library also comes with supporting libraries and scripts for using, manipulating, and parsing MAVLink streams within the pymavlink, pymavlink/tools, and pymavlink/examples directories.
The scripts have the following requirements:
- Python 2.7+ and 3.3+
PYTHONPATHspecifies the directory path that contains the
- Write access to the entire mavlink folder.
- Your dialect's XML file is in
The scripts can be executed by running Python with the
-m switch, which indicates that the given script exists on the
PYTHONPATH. The following code runs mavlogdump.py in /pymavlink/tools/ on the recorded MAVLink stream
test_run.mavlink (other scripts in /tools and /scripts can be run in a similar fashion):
python -m pymavlink.tools.mavlogdump test_run.mavlink
-mswitch is the proper way to run Python scripts that are part of a library as per PEP-328 (and the rejected PEP-3122).