Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage notebook load and DOS files #35

Closed
williamstein opened this issue Sep 12, 2006 · 1 comment
Closed

sage notebook load and DOS files #35

williamstein opened this issue Sep 12, 2006 · 1 comment

Comments

@williamstein
Copy link
Contributor

SAGE notebook load doesn't deal with DOS format files correctly,
but python import does.

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/35

@williamstein
Copy link
Contributor Author

comment:2

Fixed.

# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1169205070 28800
# Node ID 21687c50ad918c8af09e6338ea5835c19a43f819
# Parent  4c0bbf3706fad3a37607129c520366de1b20e452
fixed trac #35 -- laoding dos file didn't work.  (change split('\n') to splitlines())

diff -r 4c0bbf3706fa -r 21687c50ad91 sage/misc/preparser.py
--- a/sage/misc/preparser.py    Fri Jan 19 03:07:12 2007 -0800
+++ b/sage/misc/preparser.py    Fri Jan 19 03:11:10 2007 -0800
@@ -385,7 +385,7 @@ def preparse_file(contents, attached={},
     loaded_files = []
 
     F = []
-    A = contents.split('\n')
+    A = contents.splitlines()
     i = 0
     while i < len(A):
         L = A[i].rstrip()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant