Opened 15 years ago
Last modified 11 years ago
#378 closed enhancement
User-specified path for load and attach — at Version 9
Reported by: | was | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-4.6.1 |
Component: | user interface | Keywords: | |
Cc: | rossk | Merged in: | |
Authors: | Mitesh Patel | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
The patch allows
sage: load_attach_path() ['.'] sage: load_attach_path('/path/to/my/sage/scripts') sage: load_attach_path() ['.', '/path/to/my/sage/scripts'] sage: attach('nifty_script1.sage') sage: attached_files() ['/path/to/my/sage/scripts/nifty_script1.sage']
You can also set an environment variable:
$ export SAGE_LOAD_ATTACH_PATH="$HOME/foo:$HOME/bar" $ sage sage: load_attach_path() ['.', '/home/mpatel/foo', '/home/mpatel/bar']
Note: We now use the full path in the attached files dictionary.
Change History (11)
comment:1 Changed 14 years ago by
- Milestone set to Sage-2.10
comment:2 Changed 12 years ago by
- Report Upstream set to N/A
comment:3 Changed 12 years ago by
So is #516.
comment:4 Changed 12 years ago by
That should be #5169.
comment:5 Changed 12 years ago by
- Description modified (diff)
- Priority changed from minor to major
- Status changed from new to needs_review
- Summary changed from user-specified sage load path to User-specified path for load and attach
Feel free to improve the patch!
comment:6 Changed 12 years ago by
- Description modified (diff)
comment:7 Changed 12 years ago by
- Status changed from needs_review to needs_work
We should skip the search, if the given filename is an absolute path.
comment:8 Changed 12 years ago by
Should we add an option (recurse=False
?) that makes load
and attach
search the entire directory tree under each search path?
comment:9 Changed 12 years ago by
- Description modified (diff)
- Status changed from needs_work to needs_review
With V2, we skip the search if given an absolute path. I've also added some examples.
Note: See
TracTickets for help on using
tickets.
#1484 is related.