1#!/usr/bin/env python2 2# This file is a wrapper around nanopb_generator.py in case you want to run 3# it with Python 2 instead of default Python 3. This only exists for backwards 4# compatibility, do not use for new projects. 5 6from nanopb_generator import * 7 8if __name__ == '__main__': 9 # Check if we are running as a plugin under protoc 10 if 'protoc-gen-' in sys.argv[0] or '--protoc-plugin' in sys.argv: 11 main_plugin() 12 else: 13 main_cli() 14