A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/332885.html below:

How to copy a file from one machine to another machine

How to copy a file from one machine to another machine How to copy a file from one machine to another machineNico Grubert nicogrubert at gmail.com
Wed Sep 21 05:40:27 EDT 2005
Hi there,

I would like to copy a file from one machine (machine #01) to another 
(machine #02).

machine #01: Suse Linux 9.2, Samba 3, Python 2.3.5
machine #02: Windows Machine, Destination Dir: <Share>\temp\files\

Both machines are in one network so they can communicate each other. In 
order to be able to write a file in the directory on Machine #02 I need 
to be the user "myadmin".

In a short Python program I create the source file on Machine #01 like this:

filecontent = 'This is just a test...'
# my own helper method to generate a unique filename
filename = createUniqueFilename()
f = open('/var/files/' + filename, 'w')
f.write(filecontent)
f.close()


Every time a new source file has been created it needs to be copied or 
moved from machine #01 to machine #02.
Are there Python modules which help me doing this job? Any examples how 
to do that would be very helpful.

Kind regards and many thanks in advance,
Nico

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4