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

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 9  |  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. New Line in Log File
  2. f = open("C:UsersuserDesktopLog.file")
  3.        
  4. f.write("n" + "25/01/2012")
  5.        
  6. Traceback (most recent call last):
  7. File "<pyshell#4>", line 1, in <module>
  8.     f.write('n' + "25/01/2012")
  9. IOError: File not open for writing
  10.        
  11. f = open("C:UsersuserDesktopLog.file","w");
  12.        
  13. f = open("C:UsersuserDesktopLog.file", 'a')
  14.        
  15. open("C:UsersuserDesktopLog.file", "w")