There`s a getpass module that takes care about currently logged user.

import getpass
print getpass.getuser()

getuser() will return of the user.here you can read more about.

Random Posts