Alright I got how to make ``load "test space.py"`` work for the
notebook too. The problem is in:

/home/rado/sage-3.4/devel/sage/sage/server/notebook/worksheet.py

line 3558:  for filename in L.split():

the python split function splits "test space.py" to '"test' and
'space.py"'. I googled for a bit and found here
http://stackoverflow.com/questions/79968/split-a-string-by-spaces-preserving-quoted-substrings-in-python
that there is part of the python standard library for splitting
shell.

The fix is simple, just use

import shlex
for filename in shlex.split(L):

I tried it at it works.

I am completely new to software development, so don't know how to
submit a patch (if this is patch-worthy). But at least now it is on
the forum so stubborn people with spaces in their folder names can
google this fix:)

Rado

On Apr 24, 10:23 pm, Nick Alexander <ncalexan...@gmail.com> wrote:
> > I can fix 2) at $SAGE_ROOT/devel/sage/sage/misc/interpreter.py
> > but actually I need a fix for 1) since I keep my files with folders
> > with spaces. Since prompt works with files with spaces, it shouldn't
> > be too hard to make the notebook work with those too, right?!?
>
> Curiously the notebook handles this completely independently of the  
> prompt.  (This is obnoxious but has a long history and is unlikely to  
> change right now.)
>
> Nick
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to