Re: getting current UNIX uid

2006-07-06 Thread Richie Hindle
[Johhny] > I am trying to get the user that is running the scripts uid, I have had > a look at the pwd module and it does not appear to offer that > functionality. Is there any way within python to get that information ? It's in the 'os' module: >>> import os >>> os.getuid() 553 -- Richie Hind

Re: getting current UNIX uid

2006-07-06 Thread Eric Deveaud
Johhny wrote: > Hello, > > I am trying to get the user that is running the scripts uid, I have had > a look at the pwd module and it does not appear to offer that > functionality. Is there any way within python to get that information ? eg: username = pwd.getpwuid(os.getuid())[4] Eri

getting current UNIX uid

2006-07-06 Thread Johhny
Hello, I am trying to get the user that is running the scripts uid, I have had a look at the pwd module and it does not appear to offer that functionality. Is there any way within python to get that information ? Regards, Johhny -- http://mail.python.org/mailman/listinfo/python-list