On Wednesday 30 May 2007 12:14, William Stein wrote: > On 5/30/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote: > > > There is currently no function to clear these, > > > so I just wrote one. The attached patch adds a function clear_vars() > > > that when called removes all 1-letter symbolic variables that are > > > currently defined. > > > > I absolutely agree with the OP that these predefined things are not the > > right way to go for a programming environment. Wouldn't it be > > reasonable to cause these one letter variables to be defined at the same > > point in the sage script where you start IPython? > > Unfortunately I do not understand what you're suggesting. What is "the > sage script"? > What does "starting IPython" have to do with anything? Please clarify.
Yes, I agree, that was a rather miserable description. I meant to trigger the extra variable insertions from the script in local/bin/sage-sage. It seems that there is one code-path from the options to running sage-ipython and a distinct code-path to run .sage/.py/.spyx scripts using sage-run. The variable insertions could be triggered directly before the sage-ipython call. I'm not entirely certain that I've comprehended the sage-sage bash script correctly. I'm also not entirely certain about all the technicalities of inserting the variables into the ipython namespace (I'm thinking that you would call a function -- e.g. inject_interactive_global_names() -- from the SAGE_STARTUP_COMMAND bash script variable). This would have the advantage of being a central place to manage global names to some extent. This could help to combat and clarify namespace pollution (although I'm not saying that's a problem (yet)). -- Joel --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---