[Tutor] Writing to a file on another server
dman
dsh8290@rit.edu
Thu, 6 Dec 2001 11:11:08 -0500
On Thu, Dec 06, 2001 at 06:11:25AM -0500, Sheree Beaudette wrote:
| I am working on a Windows NT machine. The remote server is also Windows
| NT. The server I want to write to is a Novell server.
How does your system access the server? How do your other apps access
it (eg, notepad)?
My guess is that it is a samba share, and you either access it by
mapping it to a drive letter
z:\path\to\file.txt
or with a complete samba path
\\servername\path\to\file.txt
In either case (but use the right path),
f = open( "\\servername\path\to\file.txt" , "w" )
f.write( "hello world!" )
f.close()
will do what you want. This is the neat thing about having the system
mount remote filesystems as treat them as local -- none of the
applications have to know or care!
-D
--
He who finds a wife finds what is good
and receives favor from the Lord.
Proverbs 18:22