Scanner

Using the Scanner module

The PyWayland scanner allows you to generate the protocol scanner output within Python scripts. The general procedure to invoke the scanner will be to make a Protocol object, scan the input file, and have the Protocol output to a directory. These steps are done as:

Protocol(path_to_xml_file)
Protocol.scan()
Protocol.output(path_to_output_dir)

See the definitions below for more information on using Protocol objects.

Protocol Module

class pywayland.scanner.Protocol(input_file)
output(output_dir, module_imports)

Output the scanned files to the given directory

Parameters:output_dir (string) – Path of directory to output protocol files to