Rewriting the notebook's filesystem

37 views
Skip to first unread message

Kyle Brooks

unread,
Jun 21, 2012, 6:14:07 PM6/21/12
to sage-n...@googlegroups.com
As far as I can tell, the only non-hack solution to the problem of implementing
folders and links in the sage notebook is to rewrite the entire filesystem 
to replace the current "home/user/<id_number>" representation and toward 
a more robust "home/user/<path>" system. This would be backwards-compatible
with the old system, because a user's existing worksheets would just have the 
new "path" variable set to their old id_number. Links would work because the 
creator of a group of worksheets would be able to predict a worksheet's 
filename.

The first step I'm going to take is to rewrite the system to work with strings
(filenames) instead of id numbers (ints). When that is done I will start 
implementing folders. 

Does anyone have any suggestions or other input?

Jason Grout

unread,
Jun 21, 2012, 9:44:03 PM6/21/12
to sage-n...@googlegroups.com
You might just try to go with paths right off the bat. Flask can get an
entire path using something like in the example here:

http://flask.pocoo.org/docs/api/#flask.send_from_directory

It's documented here:
http://werkzeug.pocoo.org/docs/routing/#werkzeug.routing.PathConverter

Jason



Reply all
Reply to author
Forward
0 new messages