Ticket #11503: trac_11503_cmd_line_fix.patch

File trac_11503_cmd_line_fix.patch, 995 bytes (added by gutow, 11 years ago)

plot3d command line fix

  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # User Jonathan Gutow <gutow@uwosh.edu>
    # Date 1308241801 25200
    # Node ID 7714e894c41a0b9245037e4920e734d7a56362b5
    # Parent  5b8069f42aa3c2bc61d9129a683dbd247c4afdfe
    trac 11503 - plot3d fix for command line with moved Jmol
    
    diff -r 5b8069f42aa3 -r 7714e894c41a sage/plot/plot3d/base.pyx
    a b  
    11191119            if not EMBEDDED_MODE:
    11201120                ext = "spt"#.spt is script extension
    11211121            f = open(filename + '.%s'%ext, 'w')
    1122             f.write('set defaultdirectory "%s"\n' % archive_name)
     1122            import sagenb
     1123            if EMBEDDED_MODE:
     1124                path = "cells/%s/%s" %(sagenb.notebook.interact.SAGE_CELL_ID, archive_name)
     1125            else:
     1126                path = archive_name
     1127            f.write('set defaultdirectory \"%s\"\n' %path)
    11231128            f.write('script SCRIPT\n')
    11241129            f.close()
    11251130