nrvr.util.user
index
/usr/lib/python2.7/site-packages/nrvr/util/user.py

nrvr.util.user - Utilities regarding user running script
 
Class provided by this module is ScriptUser.
 
As implemented works in Linux.  Probably limited compatibility with Windows.
 
Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com>
 
Public repository - https://github.com/srguiwiz/nrvr-commander
 
Copyright (c) Nirvana Research 2006-2015.
Simplified BSD License

 
Modules
       
getpass
os

 
Classes
       
__builtin__.object
ScriptUser

 
class ScriptUser(__builtin__.object)
    A user running the script.
 
  Methods defined here:
__init__(self, userName)
Create new user descriptor.
current = <nrvr.util.user.ScriptUser object> loggedIn = <nrvr.util.user.ScriptUser object>
userHomeRelative(self, path='')
Interpret given path relative to user's home directory.

Class methods defined here:
rootRequired(cls) from __builtin__.type
Raise exception if not running as root.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
userHome
User's home directory.
userName
User name.
 
Maybe better described as the alphanumeric user id.