sample_python_gobject.py 289 B

1234567891011121314
  1. #!/usr/bin/env python3
  2. """A simple test that uses python-gobject to find the path of sh."""
  3. from gi.repository import GLib
  4. def main():
  5. sh_path = GLib.find_program_in_path('sh')
  6. if sh_path == "/bin/sh":
  7. return True
  8. return False
  9. if __name__ == '__main__':
  10. main()