On 11/10/2012 12:27 PM, tvn wrote:
I'd like to import some utility files in a separate directory to my
project, e.g. that I can do "import util" from the Sage prompt. Adding
tat directory to the SAGE_PATH variable allows me to do so, however
doing that will cause problem when I want to read the document of any
function in SAGE. For example,
sage: solve??
ImportError Traceback (most recent call last)
....
ImportError: No module named conf
Any idea how to properly import files from a different directory ?
If all your files are only in one directory you can do this.
import os
os.chdir('/path/to/utility/directory')
import util
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.