Ticket #11503: trac-11503-jmol-commandline.patch

File trac-11503-jmol-commandline.patch, 1.3 KB (added by jason, 10 years ago)

apply to sage repository

  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # User Jason Grout <jason.grout@drake.edu>
    # Date 1326867021 21600
    # Node ID d577469c86fda5908741c5c6fbce0b0a9bd2df52
    # Parent  8cd479e7ed260f61af3c1ea0acd673c054562bc2
    With the jmol update, the .jmol suffix indicates a special kind of compressed file, so we change the extension to spt instead.
    
    diff --git a/sage/plot/plot3d/base.pyx b/sage/plot/plot3d/base.pyx
    a b  
    11141114            #if fg >= 2:
    11151115            #    fg = 2
    11161116            filename = '%s-size%s%s'%(base, fg*100, ext)
    1117             ext = "jmol"
     1117            if EMBEDDED_MODE:
     1118                ext = "jmol"
     1119            else:
     1120                ext = "spt"
    11181121            archive_name = "%s.%s.zip" % (filename, ext)
    11191122            if EMBEDDED_MODE:
    11201123                # jmol doesn't seem to correctly parse the ?params part of a URL
     
    11251128            viewer_app = os.path.join(sage.misc.misc.SAGE_LOCAL, "bin/jmol")
    11261129
    11271130            # We need a script to load the file
    1128             f = open(filename + '.jmol', 'w')
     1131            f = open(filename + '.'+ext, 'w')
    11291132            if EMBEDDED_MODE:
    11301133                import sagenb
    11311134                path = "cells/%s/%s" %(sagenb.notebook.interact.SAGE_CELL_ID, archive_name)