--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/37172648-3401-4431-b2aa-862b69e24193n%40googlegroups.com.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Sample Python script to call GAM"""
import multiprocessing
import sys
import gam
if __name__ == '__main__':
# One time initialization
if sys.platform == 'darwin':
multiprocessing.set_start_method('fork')
gam.initializeLogging()
#
gam.CallGAMCommand(['gam', 'version'])
# Issue command, output goes to stdout/stderr
rc = gam.CallGAMCommand(['gam', 'info', 'domain'])
# Issue command, redirect stdout/stderr
rc = gam.CallGAMCommand(['gam', 'redirect', 'stdout', 'domain.txt', 'redirect', 'stderr', 'stdout', 'info', 'domain'])
Ross
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAG56vfMaauqfoNMNxYAFWhzE6%3D80nNdwrdn_mAQj04onTESB4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS-ws%2BrkiDe6PTH2Q0N7NTqLQOs3QrFUth6pYeECn5sAeg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CA%2BVVBp8%3DLcYWPFEcvgD7k9ZyZEWsCi8PCuJUd19xhGUpfGky2g%40mail.gmail.com.