Opened 9 years ago

Closed 9 years ago

#8092 closed defect (fixed)

init.sage not attached in worksheets

Reported by: mpatel Owned by: was
Priority: major Milestone: sage-4.4.2
Component: notebook Keywords:
Cc: was Merged in: sagenb-0.8
Authors: Mitesh Patel Reviewers: William Stein, Tim Dumol
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

From the main notebook help page:

The file $HOME/.sage/init.sage is attached on startup if it exists.

But the file is not attached --- try evaluating attached_files(). This is a follow-up to #7514.

See sage-devel, sage-notebook.

Attachments (2)

trac_8092-init_sage.patch (831 bytes) - added by mpatel 9 years ago.
Attach DOT_SAGE/init.sage. sagenb repo.
trac_8092-init_sage.2.patch (833 bytes) - added by mpatel 9 years ago.
Fixes Oops! Replaces previous.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by mpatel

Attach DOT_SAGE/init.sage. sagenb repo.

comment:1 Changed 9 years ago by mpatel

  • Authors set to Mitesh Patel
  • Cc was added
  • Milestone set to sage-4.3.2
  • Status changed from new to needs_review

The attached patch seems to work for me.  DOT_SAGE/init.sage is equivalent to os.environ['SAGE_STARTUP_FILE'] (see SAGE_LOCAL/bin/ipy_profile_sage.py).

comment:2 Changed 9 years ago by was

  • Status changed from needs_review to needs_work

Oops!

except KeyError, IOError:

should be

except (KeyError, IOError):

This is one of those very annoying tricky mistakes people make with Python exceptions...

Changed 9 years ago by mpatel

Fixes Oops! Replaces previous.

comment:3 Changed 9 years ago by mpatel

  • Reviewers set to William Stein
  • Status changed from needs_work to needs_review

comment:4 Changed 9 years ago by timdumol

  • Reviewers changed from William Stein to William Stein, Tim Dumol
  • Status changed from needs_review to positive_review

LGTM.

comment:5 Changed 9 years ago by timdumol

  • Merged in set to sagenb-0.8

comment:6 Changed 9 years ago by timdumol

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.