Creating python script with GAM

113 views
Skip to first unread message

Lex Luthor

unread,
May 3, 2017, 4:18:33 AM5/3/17
to GAM for G Suite
Hello,

I would like to create script to make some GAM actions automatic (combining different commands). 
However, although I have already used Python a little bit, I have never done any script. 

I'm wondering how I will be able to manipulate the arguments returned by the GAM commands. 
For example, when I use the command that returns me all the Google Drive files and their fields, can I save the result in a list ? If yes, how ? (Should I just put l = [] and then l = "GAM command" ?)
If it is a char that is returned by the command, can I convert it so that I could exploit the information ? 

I'm a bit lost, your help would be precious. 
Thank you.  

Nathan R

unread,
May 12, 2017, 1:38:27 PM5/12/17
to GAM for G Suite

Hi Lex

It depends on how you are calling the GAM application from Python but I would guess your output is a string with rows delimited by new lines (\n) and values in each row delimited by commas . 
If that is the case you could use the split function to convert the data to a list. 

Want to paste your code and of the output you are working with? That'll make it easier to see what you are trying to accomplish.

Nathan
--
Reply all
Reply to author
Forward
0 new messages