os.listdir("\\\\delta\\public")
Ishwor
ishwor.gurung at gmail.com
Sat Dec 4 12:16:42 EST 2004
On Sat, 04 Dec 2004 11:40:15 -0500, Peter Hansen <peter at engcorp.com> wrote:
> As Michael points out, there's no reason to think that should
> have worked. You can't do a directory of a computer, only
> a drive on the computer, and likewise you can't do a directory
> of a computer on a network, only of the resources is shares.
>
> Try grabbing the output of os.popen(r"net view \\delta") and
> parse it to get a list of the shares:
>
> c:\>net view \\monolith
> Shared resources at \\monolith
> Share name Type Used as Comment
> -------------------------------------------------------------------------------
> Printer Print Microsoft Office Document Image Writer
> Printer2 Print hp psc 1310 series
> Printer3 Print HP LaserJet 4
> shared Disk I:
> SharedDocs Disk
> The command completed successfully.
>
> No doubt you can also do this much more easily with the pywin32
> package, or via COM (using pywin32 or ctypes), but I'll leave
> that response to someone else. Or you could figure it out yourself
> if you are motivated enough.
>
> -Peter
[snip]
sorry my mistake :)
--
cheers,
Ishwor Gurung
More information about the Python-list
mailing list