How to use NetUseGetInfo() ?
Frank Immich
frankimmich at gmx.de
Fri Dec 7 03:20:17 EST 2001
Hello there,
I have a question concerning the win32net module.
I want to map the networkpath (UNC) to the corresponding network resource
with Python.
E.g. E: = \\server1\dr1\dir2
Therefore, I think, I have to use NetUseGetInfo() ?
But I get the following error thread:
import win32net
> dict = win32net.NetUseGetInfo( None, 'E:' , 0 )
>
> Traceback (most recent call last):
> File "C:\info.py", line 4, in ?
> dict = win32net.NetUseGetInfo( None, 'E:' , 0 )
> pywintypes.api_error: (2250, 'NetUseGetInfo', 'Die Netzwerkverbindung
> konnte
> nicht gefunden werden.
This tells me that the Network connection couldn’t be found...
But the DOS command: net use E: works fine !!!
What’s wrong. Am I using the NetUseGetInfo() command correct ?
Thanks for help
Ciao Frank
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
More information about the Python-list
mailing list