How to get the user name, and to show a select directory dialog?
Peter Hansen
peter at engcorp.com
Sun May 25 21:54:33 EDT 2003
Mark Hammond wrote:
>
> Peter Hansen wrote:
> >>>>win32wnet.WNetGetUser()
> >
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in ?
> > RuntimeError: Couldn't get the buffer size!
> >
> > Looks like, possibly WNetGetUser() (note capitalization) exists but
> > has a problem internally, but WNetGetuser() does not even exist.
>
> It works for me on XP - further, I just checked the code, and unlike
> another XP specific problem, we aren't relying on a specific error code
> to detect this situation - so the current code looks OK.
>
> A quick search through the web suggests that WNetGetUser() may fail if:
> * There are invalid characters or spaces in the Computer Name box.
> * There is no network client installed.
>
> But I doubt that is your case.
True, neither is the case here. I'll try to investigate a bit
and see what I can learn.
More information about the Python-list
mailing list