Python os.getgid() Method
Example
Find the real group id of the current process:
#Import os Library
import os
#Print the real group id of the
current process
print (os.getgid())
Try it Yourself »
Definition and Usage
The os.getgid()
method returns the real group id of the current process.
A group identifier is a numeric value representing a specific group. The first 100 GIDs are usually reserved for system use. GIDs are stored in the /etc/groups file. GID 0 corresponds to the root group and GID 100 represents the users group.
Note: Group ids are only available on UNIX systems.
Syntax
os.getgid()
Technical Details
Return Value: | A int value, representing the real group
id of the current process |
---|---|
Python Version: | 2.6 |