[Tutor] python win32 drive mapping help
Dave Angel
davea at ieee.org
Sat Sep 26 01:40:15 CEST 2009
Vineet Kothari wrote:
> So What should be the attributes for the command?
>
> I tried this:
>
> win32net.NetUseDel(None, 1,{'local':'k:'})
>
>
> but I got this error:
>
> Traceback (most recent call last):
>
>> File "test.py", line 33, in <module>
>> win32net.NetUseDel(None, 1,{'local':'k:'})
>> TypeError: an integer is required
>>
>>
>
> So what should be the attributes for the NetUseDel?
>
> Thanks!
> - Vineet
>
(You shouldn't top-post. Add your message to the end of the existing
ones, or sometimes in-line. Otherwise the message context gets very
confusing.)
You have the wrong sequence for NetUseDel(). Try:
win32net.NetUseDel(None, 'k:', win32net.USE_FORCE)
(It's the 3rd argument it was complaining about, since that's a constant
(of value 1, actually)).
I'm guessing you're confusing the docs for NetUseAdd for NetUseDel.
DaveA
More information about the Tutor
mailing list