CR+LF problem

Christos TZOTZIOY Georgiou DLNXPEGFQVEB at spammotel.com
Thu Jun 20 10:38:43 EDT 2002


On Thu, 20 Jun 2002 11:33:55 GMT, rumours say that mruiz at safa.es (Manuel
Ruiz) might have written:

>char * txt = "print 123\r\n";
>result = PyRun_Simple( txt, Py_file_input, PyDict_New(), NULL );

did you try
	char *txt= "print 123\n";
by any chance?
I am not very sure if I do help, but in C, newlines are just "\n".
"\r\n" is by convention the text line terminator of VMS IIRC, MS-DOS &
window derivatives etc.

>this code fails to exec txt, I got a SyntaxError exception,
>however I if save to file the statement "print 123\r\n" and try to run
>it ussing python interprete (version 2.2.1) It run fine.
>
>Can anyone tell me anything about this rare behaviour

-- 
TZOTZIOY, I speak England very best,
Real email address: 'dHpvdEBzaWwtdGVjLmdy\n'.decode('base64')



More information about the Python-list mailing list