FAQ
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:\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

Search Discussions

  • Wolfgang Strobl at Dec 7, 2001 at 6:19 pm

    On 7 Dec 2001 00:30:17 -0800, frankimmich at gmx.de (F.Immich) wrote :
    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() ?
    No, you don't.

    Use NetUseAdd, like so:
    win32net.NetUseAdd(None,1,{'remote': u'\\\\wbox\\filme', 'local': u'v:'})
    win32net.NetUseGetInfo(None,"v:")
    {'remote': u'\\\\wbox\\filme', 'local': u'V:'}
    >>>

    --
    Thank you for observing all safety precautions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedDec 7, '01 at 8:30a
activeDec 7, '01 at 6:19p
posts2
users2
websitepython.org

2 users in discussion

Wolfgang Strobl: 1 post F.Immich: 1 post

People

Translate

site design / logo © 2022 Grokbase