Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.17 KB  |  hits: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Writing a string to the last line in a file, Python
  2. def write (self, string) :
  3.     # self.Dir is a txt file
  4.     self.File = file(self.Dir, 'w')
  5.     self.File.write(string)