sample() decreases randomness because a char will only be chosen from
the pool once for the string. Consider:
random.sample(string.digits, 10)
you'll always get the numbers 0-9 in some random order whereas:
random.choice(string.digits) for _ in range(10)
will give you greater randomness as there are 10 choices for every char.
The step to enable domain-wide delegation for a service account is
unnecessary. Even when unchecked, the service account gets access to the
scopes that admin has granted in admin console (gam user <email> check
serviceaccount).
* Handle missing credentials, e.g., two gam oauth deletes in a row
* Add scopes back to oauth2.txt
If scopes are in oauth2.txt, an advanced gam user can use it unchanged. My code does preemptive error checking to detect API scope mismatches early on.
* Suppress token details unless requested
* Bring on the details
* Update scopes used to make oauth2.txt
* Clean up random string generation
You don't want printable.
string.printable: String of characters which are considered printable. This is a combination of digits, letters, punctuation, and whitespace.
string.whitespace: A string containing all characters that are considered whitespace. On most systems this includes the characters space, tab, linefeed, return, formfeed, and vertical tab.
* Cleanup
* Update printevents
The column header should be calendarId not primaryEmail as the user could specify a resource calendar for instance.
The order should be calendarId,id: major,minor as in other print commands.
* Event cleanup
* More event cleanup