WinNT User Name

richard_chamberlain richard_chamberlain at ntlworld.com
Mon Jul 3 14:52:52 EDT 2000


Hi Michael,

You'll need the win32 extensions - http://starship.python.net/crew/mhammond/

import win32api
login=win32api.GetUserName()

Richard


import win32api
michael montagne <montagne at boora.com> wrote in message
news:Ae485.94210$5k2.194235 at dfw-read.news.verio.net...
> First off, I'm a newbie at Python.
> I'm trying to return the user who is logged on at a PC.  What I really
need
> is the login name.  How do I do that?  Seems like it otta be quite simple
> but I'm having trouble.
>
> -mjm
>
>





More information about the Python-list mailing list