Convert one or both of a string representation of a UID and GID into
integer form. On platforms where
pwd
and
grp
is
available, user and group names can be converted.
Parameters | uid | A string giving the base-ten representation of a UID or the name of a
user which can be converted to a UID via pwd.getpwnam , or None
if no UID value is to be obtained.
(type: str or NoneType
) |
| gid | (type: str or NoneType
) |
| uid | A string giving the base-ten representation of a GID or the name of a
group which can be converted to a GID via grp.getgrnam , or
None if no UID value is to be obtained.
|
Returns | A two-tuple giving integer UID and GID information for whichever (or
both) parameter is provided with a non-None value.
|
Raises | ValueError | If a user or group name is supplied and pwd or
grp is not available.
|