Sweet, I will give it a shot. One last thing I noticed is that attached_files() is not exposed to the user. Again not sure if this is how its supposed to work or an actual bug. But if one can attach without refering to a library it would make sense to see what is currently attached again without extra work. Or at least the doc should be clearer on this. Here is what I mean:
in command line: sage:attach test.py sage:attached_files() <---- fail, NameError: name 'attach_files' is not defined sage:sage.misc.interpreter.attached_files() <----works in notebook: sage:attach test.py sage:attached_files() <---- fail, AttributeError: 'module' object has no attribute 'attached_files' sage:w.attached_files() <--- this should work theoretically, once I figure out how to get a hold of the current worksheet and assign it to w. Any ideas? Rado On Apr 25, 1:21 am, William Stein <wst...@gmail.com> wrote: > On Fri, Apr 24, 2009 at 9:07 PM, Rado <rki...@gmail.com> wrote: > > > 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-pre... > > 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 > > I think it would be awesome if you would fix this, and submit a patch! > Then you'll get official credit, and have really fully contributed to > Sage. > > You can read the Sage Developer Guide: > http://sagemath.org/doc/developer/ > > The short answer about how to make a patch is: > > (1) change devel/sage/sage/stuff > (2) sage: hg_sage.ci() > (3) sage: hg_sage.export('tip') > (4) copy the resulting numbered_file.patch somewhere. > > -- William --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---