Ticket #11503: trac_11503-jmol-commandline.rebase.patch

File trac_11503-jmol-commandline.rebase.patch, 1.2 KB (added by kini, 10 years ago)

apply to $SAGE_ROOT/devel/sage

  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # Parent 7e8784ab604a363654f47cfeaf0c3f5a1725d2c2
    # User Jason Grout <jason.grout@drake.edu>
    # Date 1327043213 -28800
    
    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            f.write('set defaultdirectory "%s"\n' % archive_name)
    11301133            f.write('script SCRIPT\n')
    11311134            f.close()