How to use win32.NetUseGetInfo()

F.Immich frankimmich at
Fri Dec 7 03:30: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 within 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:\", 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

More information about the Python-list mailing list