Skip to content

Instantly share code, notes, and snippets.

@Nemolog
Created March 1, 2009 13:45
Show Gist options
  • Save Nemolog/72332 to your computer and use it in GitHub Desktop.
Save Nemolog/72332 to your computer and use it in GitHub Desktop.
copy a file python
print "Avvio di Python Program...";
#lettura del file
file_object = open('/home/nemolog/LotusInstall.log');
print "File sorgente: ", file_object
all_the_text = file_object.read( )
file_object.close( )
#print all_the_text
#scrivo tutto il contenuto del file su 'test.txt'
output = open('/home/nemolog/Scrivania/test.txt', 'w')
print "File di destinazione: ", output
output.write(all_the_text)
print "Contenuto copiato!"
output.flush()
print "Fine Python Program...";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment