[Patches] [ python-Patches-934971 ] trace.py and CR at EOL
SourceForge.net
noreply at sourceforge.net
Thu Apr 15 23:29:34 EDT 2004
Patches item #934971, was opened at 2004-04-14 09:32
Message generated for change (Settings changed) made by montanaro
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=934971&group_id=5470
Category: Library (Lib)
Group: Python 2.3
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Felix Wiemann (felixwiemann)
Assigned to: Skip Montanaro (montanaro)
Summary: trace.py and CR at EOL
Initial Comment:
trace.py has problems with carriage returns on Unix systems
when using the --missing switch:
$ cat -v test.py
print "Hello"^M
print "World!"^M
Note the carriage returns.
$ python test.py
Hello
World!
Works fine.
$ python /usr/lib/python2.3/trace.py --count
--coverdir=. --missing test.py
Hello
World!
Traceback (most recent call last):
File "/usr/lib/python2.3/trace.py", line 690, in ?
main()
File "/usr/lib/python2.3/trace.py", line 687, in main
results.write_results(missing, summary=summary,
coverdir=coverdir)
File "/usr/lib/python2.3/trace.py", line 264, in
write_results
lnotab = find_executable_linenos(filename)
File "/usr/lib/python2.3/trace.py", line 389, in
find_executable_linenos
code = compile(prog, filename, "exec")
File "test.py", line 1
print "Hello"
^
SyntaxError: invalid syntax
When using trace.py with the --missing switch, it complains
about the carriage returns.
The attached patch fixes the problem.
----------------------------------------------------------------------
>Comment By: Skip Montanaro (montanaro)
Date: 2004-04-15 22:29
Message:
Logged In: YES
user_id=44345
Thanks. Applied to trace.py 1.21. Will backport to 2.3 branch.
----------------------------------------------------------------------
Comment By: Felix Wiemann (felixwiemann)
Date: 2004-04-14 10:04
Message:
Logged In: YES
user_id=1014490
Assigned to montanaro, looks like he is the right one.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=934971&group_id=5470
More information about the Patches
mailing list