Emil wrote:
I'd like to know if it's possible to get the filename of a script that's
been run using the "load" or "attach" command at the sage: prompt.

If I insert a "print __name__" in the script I just get "__main__".

I know __name__ isn't the right thing, since I'm not dealing with an
imported Python module... But it seems like it could be possible that
there is a builtin that gives what I want, but I can't find it...

In Sage, there is attached_files() which gives a list of the filenames.


Not sure whether there's some function for just loaded files; doesn't seem Sage would keep track of them.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to