Python os.getuid() Method
Example
Find the real user id of the current process :
#Import os Library
import os
# Print real user id of the current process
print (os.getuid())
Try it Yourself »
Definition and Usage
The os.getuid()
method returns the current process' real user id.
The real user id is the one who owns the process. Operating system checks authority of a process on the basis of real user id.
Note: Only available on UNIX platforms.
Syntax
os.getuid()
Technical Details
Return Value: | A int value, representing the current process' real user id |
---|---|
Python Version: | 1.6 |