[qmtest] [PATCH] Add more annotations to QMTest runs
Anders Hasselqvist
Anders.Hasselqvist at tss.teleca.se
Thu Feb 12 07:57:12 UTC 2004
Hi,
I always seems to forget using Reply All when replying to Marks mails,
Sorry about that.
>
> >+def get_username():
> >+ """Returns the current username as a string.
> >+
> >+ If the username cannot be found, raises a 'QMException'."""
> >+
> >+ # First try using the 'getpass' module.
> >+ try:
> >+ return getpass.getuser()
> >+ except:
> >+ pass
> >
> >
> >
> Do we actually know that getpass doesn't work on Windows? The docs
> don't suggest that.
>
import getpass
print getpass.getuser()
--
prints my username. I'm running WinXP and python 2.3.3.
Regards,
--
Anders Hasselqvist <at> tss.teleca.se
Teleca Software Solutions AB, Umea
Tel: 08 - 579 116 85
Mob: 070 - 660 19 03
More information about the qmtest
mailing list