I am reading a ASCII file from LINUX(Debian) into Python CGI script where it is edited via a web page and then saved, 
If I use a graphical text editor the edited and un-edited file appear the same and are corectly formatted. 
Using vi the edited file contains ctrl M as the EOL marker and all lines rolled into one but the unedited file is correctly formatted. Using :set List in vi to see control characters the edited file remains as described above, but in the unedited file $ appears as EOL marker.
I know LINUX EOL is ctrl 0x0D but what is the $?
Why does $ format correctly and ctrl M does not?
The $ is displayed by vi (in certain modes). It is not in the file contents. You could use od -cx yourfile to check that.
LINUX End of Line