Ticket #9238: spt-attempt.diff

File spt-attempt.diff, 1.4 KB (added by kcrisman, 10 years ago)

For reference only - do not apply.

  • sage/plot/plot3d/base.pyx

    diff -r 8438b7c20d79 sage/plot/plot3d/base.pyx
    a b  
    11021102            #if fg >= 2:
    11031103            #    fg = 2
    11041104            filename = '%s-size%s%s'%(base, fg*100, ext)
    1105             ext = "jmol"
    1106             archive_name = "%s.%s.zip" % (filename, ext)
    11071105            if EMBEDDED_MODE:
     1106                ext = "jmol" # fine in applet
    11081107                # jmol doesn't seem to correctly parse the ?params part of a URL
    11091108                archive_name = "%s-%s.%s.zip" % (filename, randint(0, 1 << 30), ext)
     1109            else: # command line resolver in newer jmol expects .jmol to be a special type
     1110                ext = "spt" # stands for script
     1111                archive_name = "%s.%s.zip" % (filename, ext)
    11101112
    11111113            T = self._prepare_for_jmol(frame, axes, frame_aspect_ratio, aspect_ratio, zoom)
    11121114            T.export_jmol(archive_name, force_reload=EMBEDDED_MODE, zoom=zoom*100, **kwds)
    11131115            viewer_app = "sage-native-execute " + os.path.join(sage.misc.misc.SAGE_LOCAL, "bin/jmol")
    11141116
    11151117            # We need a script to load the file
    1116             f = open(filename + '.jmol', 'w')
     1118            f = open(filename + '.%s'%ext, 'w')
    11171119            f.write('set defaultdirectory "%s"\n' % archive_name)
    11181120            f.write('script SCRIPT\n')
    11191121            f.close()