nanopb_generator.py2 460 B

12345678910111213
  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. from nanopb_generator import *
  6. if __name__ == '__main__':
  7. # Check if we are running as a plugin under protoc
  8. if 'protoc-gen-' in sys.argv[0] or '--protoc-plugin' in sys.argv:
  9. main_plugin()
  10. else:
  11. main_cli()