The load() and attach()ed files should obviously be treated the same
(except for the reloading part), and offer a unified interface. Right now
that is IMHO a lot of spaghetti code that grew over the years. The fact
that even simple patches don't get reviewed
(http://trac.sagemath.org/14523) did
Emil wrote:
Thanks Leif. inspect.getfile() doesn't seem to do what I want.
The situation is that I have a number of scripts, s1.sage, s2.sage, etc,
and I'd like them to be able to write to a '.js' file with the same name
as their filenames, e.g. s3.sage would write to s3.js, etc. I thought I
mig
Thanks Leif. inspect.getfile() doesn't seem to do what I want.
The situation is that I have a number of scripts, s1.sage, s2.sage, etc,
and I'd like them to be able to write to a '.js' file with the same name as
their filenames, e.g. s3.sage would write to s3.js, etc. I thought I might
be able to
leif wrote:
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 w
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
import