PeteDK wrote: > Hi. > > I want to retreive the name of the currently logged in user on the OS > on which my django app lives. > Is this possible?
You are aware that on most systems, more than one user is allowed to login concurrently? [...] > i have looked into the python standard library, and a module named > getpass() however i cant get i to work:-( > > i hope someone has a clever idea to solve this problem. > > PS: and the webserver runs linux. :-) This will give you a list of the currently logged in users: >>> import commands >>> [line.split()[0] for line in commands.getoutput("/usr/bin/who").split("\n")] ['razor'] /Christian -- Christian Joergensen http://www.technobabble.dk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---