CR+LF problem

Eric Brunel eric.brunel at pragmadev.com
Fri Jun 21 10:58:12 EDT 2002


Manuel Ruiz wrote:
> 
> Hi,
> 
> ------------------------
> .
> char * txt = "print 123\r\n";
> result = PyRun_Simple( txt, Py_file_input, PyDict_New(), NULL );
> .
> -----------------------
> 
> 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

BTW, I already noticed this problem when using the "freeze" utility. If 
you're on Unix and you try to freeze a program using modules with 
DOS-style line endings, you end up with a SyntaxError...

I reported the bug (n# 464405), but for the moment, it's still open...
-- 
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com



More information about the Python-list mailing list