#5206: attach command doesn't handle carriage returns correctly
----------------------+-----------------------------------------------------
Reporter: mhampton | Owner: boothby
Type: defect | Status: new
Priority: major | Milestone: sage-3.3
Component: notebook | Keywords: attach
----------------------+-----------------------------------------------------
This problem is specific to attaching files ending with ".py" in the
notebook. It does not seem to affect the command-line, or files ending
with ".sage". Some files that are moved around from different filesystems
and editors end up having end-of-line commands that look like: "\r\n".
These raise a syntax error when attached. Here is an example (of course
you need to change the path):
{{{
testfile = file('/home/marshall/Desktop/misc/testrn.py','w')
testfile.write('my_var = 2\r\n')
testfile.close()
attach /home/marshall/Desktop/misc/testrn.py
Syntax Error:
attach /home/marshall/Desktop/misc/testrn.py
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5206>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---