import getpass <div><br></div><div>user = getpass.getuser()<br><br><div class="gmail_quote">On Tue, Jun 7, 2011 at 7:54 PM, TheSaint <span dir="ltr"><<a href="mailto:nobody@nowhere.net.no">nobody@nowhere.net.no</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
I was trying to find out whose the program launcher, but os.environ['USER']<br>
returns the user whom owns the desktop environment, regardless the program<br>
is called by root.<br>
I'd like to know it, so the program will run with the right privileges.<br>
<br>
Is there any standard function on python, that will do it?<br>
--<br>
goto /dev/null<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Nitin Pawar<br><br>
</div>