win32net, documentation

Sibylle Koczian Sibylle.Koczian at Bibliothek.Uni-Augsburg.de
Wed Mar 21 10:47:53 EST 2001


Hello, all,

I want to do the Python equivalent of 

net use k: \\server\share

so I suppose I must call

win32net.NetUseAdd("\\server", level, data).

Level = 1 should be right, I think, but I can't get the syntax right.
I'm trying to translate the api_error messages (they seem to come
directly from my german Windows version):

- "server" without the "\\": api_error 50, the network request isn't
supported

- "\\server": api_error 123, the syntax for the file name, path name or
the drive name is wrong. I've tried:

data['local'] = 'k:', 'k:\\' or 'k'
data['remote'] = 'share', '\\server\share', '\\\\server\\share',
'\\share'
data['password'] = my normal domain password
data['asg_type'] = STYPE_DISKTREE

It's a network ressource I'm using constantly, so I'm quite sure it
exists, I've got the name right and I can connect to it.

So what's the right syntax? The help file for the Win32 extensions
hasn't got anything about the USE_INFO_* dictionaries, and the MSDN
library doesn't help either.

Thank you for help
Sibylle

-- 
----
Dr. Sibylle Koczian
Universitaetsbibliothek , Abt. Naturwiss.
D-86135 Augsburg

Tel.: (0821) 598-2400, Fax : (0821) 598-2410
e-mail : Sibylle.Koczian at Bibliothek.Uni-Augsburg.DE



More information about the Python-list mailing list