File reading across network (windows)

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Aug 12 03:01:12 EDT 2008


En Tue, 12 Aug 2008 00:48:21 -0300, Prof. William Battersea  
<williambattersea at gmail.com> escribi�:

> Suppose I have a Vista machine called VISTA and an XP machine called
> XP in a workgroup named WORKGROUP. Physically they're connected to a
> router and I can see lists of public and shared files on each of them.
> How do I address these for IO?
>
> A search suggested that the form open(r"\\server\folder\folder"), but
> I tried many combinations guessing what it wants for that path in my
> case (r"\\WORKGROUP\VISTA", "\\VISTA\PUBLIC", etc), and none have
> worked so far.

This is mostly a network administrative problem...
Both machines are in the SAME workgroup, ok?
Suppose one of them (e.g. VISTA) have a shared folder named FOLDER. From  
the other PC, open Windows Explorer, and type \\VISTA\FOLDER - you should  
see the folder contents. If not, you have to make it work before  
attempting to use Python.
Once you can open the shared folder from within Windows Explorer, using  
the same path (that is, open(r"\\VISTA\FOLDER")) should work in Python.

-- 
Gabriel Genellina




More information about the Python-list mailing list