Python os.getgroups() Method
Example
Print the list of supplementary group ids associated with the current process:
#Import os Library
import os
#print the list of supplementary
group ids
print(os.getgroups())
Try it Yourself »
Definition and Usage
The os.getgroups()
method returns a list
of supplementary group
ids associated with the current process.
Note: This method is available only for Unix.
Syntax
os.getgroups()
Technical Details
Return Value: | A list, representing the supplementary group ids associated with the current process |
---|---|
Python Version: |