In the move to IPython 0.13 that happened in Sage 5.7, I deprecated
%load and renamed the command %runfile. This was because IPython
introduced a %load command with very different semantics. In IPython,
%load makes the next prompt (or input box in the notebook) contain the
code of the file, which you can then edit and run. In this change, I
was hoping to help unify the IPython and Sage communities and help
people transition between the two communities. However, this seems to
have caused more trouble than it was worth.
Currently in Sage, we have three commands with basically similar semantics:
%load filename.py -- runs the code in filename.py, but also prints a
deprecation warning telling people to use %runfile filename.py instead.
%runfile filename.py -- runs the code in filename.py, but also does
smart parsing of Sage files if you do %runfile filename.sage, downloads
files from the internet if the filename is a URL, etc. Right now %load
and %runfile are aliases of each other, except for the deprecation
warning on %load.
%run filename.py -- runs the code in filename.py. This code is from the
IPython project, and doesn't support things like %run <URL for file> or
%run filename.sage. We can add support for these things, though.
Moving forward, here is a list of a few of the options. Please vote if
you care.
[ ] Get rid of the deprecation warning on %load, and just make %runfile
and %load aliases (keep %runfile to cover people that already switched)
[ ] Leave %load the way it is for now (with the deprecation warning),
and eventually switch %load to use similar semantics to IPython's %load
(see above).
[ ] Add Sage-specific features to %run, with the idea that eventually
people can do: %run filename to do run a file, and %load filename to
'load' the contents of a file into the next prompt or code cell. This
option requires someone to do the work (or we can just overwrite the
IPython %run with our %runfile for now).
What do you think?
Thanks,
Jason
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.