[Python-bugs-list] [ python-Bugs-464405 ] freeze doesn't like DOS files on Linux

noreply@sourceforge.net noreply@sourceforge.net
Thu, 27 Sep 2001 11:02:00 -0700


Bugs item #464405, was opened at 2001-09-24 06:41
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=464405&group_id=5470

Category: Demos and Tools
Group: Python 2.1.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: freeze doesn't like DOS files on Linux

Initial Comment:
I've got a perfectly running Python program on Linux, 
importing some modules that were apparently written 
on Windows, since the files are in DOS format 
(carriage return + line feed at the end of lines).

When I try to freeze this program, the module finder 
crashes on every module in DOS format claiming that 
there's a syntx error at the end of each line.

This is not really serious, but quite annoying...

Thanks.


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-27 11:02

Message:
Logged In: YES 
user_id=6380

I can reproduce this with Python 2.2 quite easily: on Linux,
in the Tools/freeze directory, use the ../scripts/lfcr.py
script to give hello.py CRLF line endings.  Then try to
freeze it.

The cause is the code in the tokenizer that parses from
strings, which doesn't like the \r\n line endings and
doesn't throw the \r out like the code that parses from a
file does.

I'm tempted to request a feature that the tokenizer should
be smarter when it finds a \r (e.g. just ignore it).

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-09-26 12:51

Message:
Logged In: YES 
user_id=21627

What Python version? Could you please submit an example of 
one of the files it is complaining about? Since you cannot 
attach it to this report, it would be good if you could 
open a new report. When doing so, please identify 
yourself. 


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=464405&group_id=5470