On Tue, 18 Nov 2008 01:11:35 -0800 (PST)
Simon King <[EMAIL PROTECTED]> wrote:
>
> Dear Burcin,
>
> On Nov 18, 9:51 am, Burcin Erocal <[EMAIL PROTECTED]> wrote:
> > I do this with the code I develop out of the tree too. You need to
> > import your module explicitly for each doctest, i.e., include a
> > "from foo import func_name" at the beginning of your EXAMPLES:
> > section.
>
> OK, I'll change it accordingly!
>
> > A patch fixing this is in 3.2.rc1, but I don't recall if it was in a
> > previous stable release or not. Which version are you using?
>
> Still version 3.1.4
>
> In other words, if the next release appears (couple of days?) it would
> work. I guess I can wait a few days.
>
> > Sage seems to include the current directory in the module search
> > path (sys.path). This is not the case for doctesting.
>
> Do I understand correctly that this will be fixed in Sage 3.2?
Yes, it will be fixed in 3.2.
> > I think using the SAGE_PATH variable in general is a better
> > approach.
>
> Do you mean "better approach for Sage" or "better approach for my
> writing doc-tests"? By the way, what is SAGE_PATH? It isn't defined,
> and even search_src('SAGE_PATH') fails.
SAGE_PATH is one of the many undocumented environment variables Sage
uses [1], which I found in the list archives when I was trying to solve
this problem.
After complaints about Sage clearing the PYTHONPATH environment, it was
suggested that we use a different variable for this. SAGE_PATH was
chosen. It works for the command line, and the notebook, but it
was ignored for doctesting.
BTW, there are a few bugs in trac which ask for functionality provided
by SAGE_PATH, it would be good to see if they can be closed.
[1] Do we at least have a wiki page about these environment variables?
Cheers,
Burcin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---