I'm using the following command to write text to a file. However, after executing this procedure, the saved text appears to have two newlines appended to the text.
proc saveFile { file } {
set f [open $file w+]
puts $f [.textEntry get 1.0 end]
close $f
}
Here is the proc to open the file for input...
proc openFile { file } {
set f [open $file]
.textEntry delete 1.0 end
.textEntry insert end [read $f]
close $f
}
How can I save the file without the newlines appended?
Brad
proc saveFile { file } {
set f [open $file w+]
puts $f [.textEntry get 1.0 end]
close $f
}
Here is the proc to open the file for input...
proc openFile { file } {
set f [open $file]
.textEntry delete 1.0 end
.textEntry insert end [read $f]
close $f
}
How can I save the file without the newlines appended?
Brad