getting files from a windows network

Chris Liechti cliechti at
Tue Jun 11 01:50:31 CEST 2002

sameer_ at (sameer) wrote in 
news:6bd9f01b.0206101523.7af66fc8 at
> is there a way to read files in python that are found on a windows
> network, i.e. files that users choose to share on their computers on a
> windows network.

do you mean by e.g.
>>> open(r'\\computername\share\test.txt').read()

yes :-)

( r'' is a raw string that doesn't touches backslashes unlike normal 

if you want a list of computers you can use:
>>> map(str.strip, os.popen("net view").readlines()[3:-2])


Chris <cliechti at>

More information about the Python-list mailing list