Possible Duplicate:
Is there a portable way to get the current username in Python?
How can I get the username of the account by which the given script is being executed?
A username can only be used once. When receiving 'Duplicate Username found' or 'Username already exists' error message, either pick a new username or have the User with the existing username change theirs.
import getpass
print getpass.getuser()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With