#7514: rewrite load and attach
---------------------------+------------------------------------------------
   Reporter:  was          |       Owner:  tbd       
       Type:  enhancement  |      Status:  needs_work
   Priority:  major        |   Milestone:  sage-4.3  
  Component:  misc         |    Keywords:            
Work_issues:               |      Author:            
   Upstream:  N/A          |    Reviewer:            
     Merged:               |  
---------------------------+------------------------------------------------
Changes (by was):

  * status:  needs_review => needs_work


Comment:

 Replying to [comment:2 slabbe]:
 > Reading the summary of this ticket made me remember a problem I was
 having with the attach command : Can we attach a file already in the sage
 tree that we are editing? I already tried, but I stopped using it because
 sometimes the changes in the file were not considered and I have been
 stopping sage and running sage -br ever since then.
 >
 > Maybe I was doing something bad or maybe this ticket solves the problem
 or maybe it is not possible at all to do this...??
 >

 You just have to *understand* what attach does.  It reloads the file via
 execfile into the global namespace when the file changes.  You can attach
 any file, in the tree or not.  But imagine this:   In the sage tree there
 is a file foo.py.  There is another file bar.py that does "import foo" and
 uses some code in foo.  If you attach foo.py (which results in exec'ing it
 in the global interpreter namespaces), then that will have no impact at
 all on bar.py.

 Thus for some problems attach works very nicely for library code, and for
 others it doesn't.  Which is which is clearer if you know what attach
 does.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7514#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--

You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to