Its not the same issue, but http://trac.sagemath.org/sage_trac/ticket/5206 is somewhat related. I have taken to only using .py files, which seem more robust in general.
-Marshall On Jul 23, 2:14 pm, John H Palmieri <jhpalmier...@gmail.com> wrote: > On Jul 23, 9:16 am, VictorMiller <victorsmil...@gmail.com> wrote: > > > I have a sage program in a file in one of my directories called > > calc.sage. It uses a class that I wrote called Table, which I've put > > in a file called Table.py in the same directory. In the sage notebook > > I load calc.sage (by explicitly giving the path to the directory), and > > calc.sage has a line > > > from Table import Table > > > However, when I try to run it it can't find Table.py. So, the > > question is, what is the path that sage uses for import, and how do I > > change it? Is there a way to do this without having to include > > explicit path qualification in the files? > > > Victor > > Here is some more data: I created three files: > > dga.py -- contains the definition of a class Lambda > new.py -- contains the line "from dga import Lambda" > temp.sage -- identical to new.py > > From the command-line, running "load ...path.../new.py" works just > fine. On the other hand, running "load ...path.../temp.sage" does > not: it complains about not being able to find the module "dga". From > the notebook, neither works: they both complain about not being able > to find "dga". > > So there is a difference between FILE.py and FILE.sage, and there is > also a difference between running from the command-line vs. the > notebook. Can anyone illuminate any of this? > > John --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---