What happens if you rename it "sandpile.py"?  I'm not sure that will
help but there are some funny differences between running .py
and .sage files.

-Marshall

On Jun 2, 8:35 pm, davidp <[email protected]> wrote:
> I would like to run the doctests in my file, "sandpile.sage", but get
> the following error message:
>
> ++++++++++++++++++++++++++++++++++===
> xyzzy> sage -t sandpile.sage
> sage -t  "sandpile.sage"
> /usr/local/sage-devel/local/bin/sage-preparse: File file_name is
> missing
> Traceback (most recent call last):
>   File "./sandpile.py", line 18, in <module>
>     from sandpile import *
>   File "/home/davidp/math/sandpile/sage/sage-sandpile1.4/sandpile.py",
> line 167, in <module>
>     class Sandpile(DiGraph):
> NameError: name 'DiGraph' is not defined
>
>          [1.6 s]
> exit code: 1024
>
> ----------------------------------------------------------------------
> The following tests failed:
>
>         sage -t  "sandpile.sage"
> Total time for all tests: 1.6 seconds
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> I tried adding
>
>     from sage.graphs.graph import DiGraph
>
> to the file but got the same error message.
>
> Any suggestions?
>
> Thanks,
> Dave
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to