wxDirDialog
Josiah Carlson
jcarlson at nospam.uci.edu
Wed Mar 17 22:03:37 EST 2004
> What i meant is that i can select a file over the network but i need
> to select the computer name only e.g. homepc, fileserver, etc over
> the network.
>
> DO i need to use python win32 API?
Checking the wxPython demo, trying to select a computer from the
"Network Neighborhood" or "My Network Places/Computers Near Me" using
the wxDirDialog produces the following error:
Debug: e:\Projects\wx2.4\src\msw\dirdlg.cpp(161): 'SHGetPathFromIDList'
failed with error 0x00000000 (the operation completed successfully.).
It doesn't look like you can overtly select computers from a standard
dialog.
However, you can:
import os
a = os.popen('net view')
data = a.read()
a.close()
computers = [line.split('\\')[2] for line in data.split('\n')]
And get a list of computer names.
- Josiah
More information about the Python-list
mailing list