Ticket #9238: Trac_9238_script_extension.patch

File Trac_9238_script_extension.patch, 875 bytes (added by gutow, 10 years ago)

Fix to script file extension to work with new Jmol from command line

  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # User Jonathan Gutow <gutow@uwosh.edu>
    # Date 1301771712 18000
    # Node ID fefa2e1f05e394164d7dab8439752c7c94863661
    # Parent  87a437e8e19c2a2bdcabfb342d788b4db954ba27
    Trac_9238_script_extension_fix
    
    diff -r 87a437e8e19c -r fefa2e1f05e3 sage/plot/plot3d/base.pyx
    a b  
    11161116            viewer_app = os.path.join(sage.misc.misc.SAGE_LOCAL, "bin/jmol")
    11171117
    11181118            # We need a script to load the file
    1119             f = open(filename + '.jmol', 'w')
     1119            if not EMBEDDED_MODE:
     1120                ext = "spt"#.spt is script extension
     1121            f = open(filename + '.%s'%ext, 'w')
    11201122            f.write('set defaultdirectory "%s"\n' % archive_name)
    11211123            f.write('script SCRIPT\n')
    11221124            f.close()