How to get the user name, and to show a select directory dialog?

Arnal arnaud at tribu.ch
Thu May 22 17:12:37 EDT 2003


Hi!

I would like to obtain the name of the current logged user on a Windows
machine, so I can get the "My documents" and "Desktop" folders.

I want to allow the user to specify the initial directory of the save
command, and the open command. The "My documents" would be somehow basic to
acceess, but I must have the username in the path (or can I access this
folder directly with a function?). Or how to access the user name, else?

I would like, as well, to show a "select directory dialog". I can already
put a select file and put file; I think that selecting a directory must be
in the same module, isn't it?

Thanks in advance.





More information about the Python-list mailing list