Ticket #14042: trac_14042.patch

File trac_14042.patch, 948 bytes (added by jhpalmieri, 9 years ago)
  • sage/misc/interpreter.py

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1359658603 28800
    # Node ID 80f67de89f1ca46f4e982bd526bc8bc59f19a93e
    # Parent  e52aaa1873d77cda3faf2f36bb69d70ff54a5a84
    use re.split instead of split in system_raw in misc/interpreter.py
    
    diff --git a/sage/misc/interpreter.py b/sage/misc/interpreter.py
    a b class SageInteractiveShell(TerminalInter 
    189189            sage: os.WIFEXITED(status) and os.WEXITSTATUS(status) == 0
    190190            True
    191191        """
    192         path = os.path.join(os.environ['SAGE_LOCAL'],'bin',cmd.split(' |\n\t;&',1)[0])
     192        path = os.path.join(os.environ['SAGE_LOCAL'],'bin',
     193                            re.split('[ |\n\t;&]', cmd)[0])
    193194        if not os.access(path, os.X_OK):
    194195            libraries = 'LD_LIBRARY_PATH="$SAGE_ORIG_LD_LIBRARY_PATH";export LD_LIBRARY_PATH;'
    195196            if os.uname()[0]=='Darwin':