Ticket #11078: trac_11078.patch

File trac_11078.patch, 886 bytes (added by jason, 10 years ago)
  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1307989431 25200
    # Node ID 9bcc8e8103e791a534452e00e313ef78f99302bc
    # Parent  f4a3d511087a6e82bbccbc3903b412b5cd9e5a2d
    Make jmol work with the new flask notebook.
    
    diff --git a/sage/plot/plot3d/base.pyx b/sage/plot/plot3d/base.pyx
    a b  
    11261126
    11271127            # We need a script to load the file
    11281128            f = open(filename + '.jmol', 'w')
    1129             f.write('set defaultdirectory "%s"\n' % archive_name)
     1129            if EMBEDDED_MODE:
     1130                import sagenb
     1131                path = "cells/%s/%s" %(sagenb.notebook.interact.SAGE_CELL_ID, archive_name)
     1132            else:
     1133                path = archive_name
     1134            f.write('set defaultdirectory "%s"\n' %path)
    11301135            f.write('script SCRIPT\n')
    11311136            f.close()
    11321137