if I explicitly attempt to list the contents of a shared directory on a remote host using python on a windows machine, the operation succeeds, for example, the following sni
For anyone still wondering how to list network shares at the top level on windows, you can use the win32net module:
import win32net
shares, _, _ = win32net.NetShareEnum('remotehost',0)
The integer controls the type of information returned but if you just want a list of the shares then 0 will do.
This works where os.listdir('\\remotehost') fails as '\\remotehost' isn't a real folder although windows can display it like one.