#! /usr/bin/env python3 # # This script checks an MX database file for errors. # import sys # Add the Mp modules directory to the Python module load path. sys.path[:0] = [ "../../libMp" ] import Mp if ( len(sys.argv) != 2 ): print( "" ) print( "Usage: mp_dbcheck database_name" ) print( "" ) sys.exit(1); database_name = sys.argv[1] # # Create a record list. # record_list = Mp.RecordList( None ) # # Disable plotting # record_list.set_plot_enable(0) # # Read and initialize the database without connecting to any hardware. # record_list.read_database( database_name ) record_list.finish_database_initialization() print( "MX database '%s' is correctly formatted." % database_name )