#8149: files with space in their names do not load properly
----------------------+-----------------------------------------------------
   Reporter:  rkirov  |       Owner:  tbd       
       Type:  defect  |      Status:  new       
   Priority:  minor   |   Milestone:  sage-4.3.4
  Component:  misc    |    Keywords:            
     Author:          |    Upstream:  N/A       
   Reviewer:          |      Merged:            
Work_issues:          |  
----------------------+-----------------------------------------------------

Comment(by rkirov):

 ok, the culprit is in sage.misc.preparser.load

 {{{
     try:
         filename = eval(filename, globals)
     except Exception:
         # handle multiple input files separated by spaces, which was
         # maybe a bad idea, but which we have to handle for backwards
         # compatibility.
         v = filename.split()
         if len(v) > 1:
             for file in v:
                 load(file, globals, attach=attach)
             return
 }}}

 so I guess any fix for files with spacebars will break the backwards
 compatibility :/ Maybe for Sage 4 we can go away with backwards
 compatibility on this issue (also maybe remove 'eval'). The new load()
 already has capabilities of loading multiple files. Consider

 1) load('file1.py file2.py')
 2) load('file1.py','file2.py')

 2) looks more pythonic to me.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8149#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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.

Reply via email to