Comment 6 for bug 958987

Revision history for this message
Richard Stanton (a-stanton) wrote :

I've been tracing through the code to see where things are going wrong, and have found some interesting things inside the function py-execute-base, which seems to be where all this is happening.

First, is there a bug in the function py-separator-char? On my Mac, this function seems to return

"Enthought Python Distribution -- www.enthought.com/",

which is then the value given to the variable sepchar. This doesn't look like any separator character I've ever seen!

The I tried tracing through py-execute-base with two different input files, one with NO shebang, and one with a shebang line:

1) No shebang:

Line 7181: (name (py-buffer-name-prepare shell sepchar)
shell = "/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython"
sepchar = "Enthought Python Distribution -- www.enthought.com/"

Returns "*/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython*"

(temp (Make-temp-name shell)) sets temp to "/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython"

temp = "/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython60832dhn"
py-temp-directory is "/var/folders/zf/bgjm4tvs3wv_6q7_6z3b2nx00000gn/T/"

(expand-file-name temp py-temp-directory) returns "/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython60832dhn"

2) *With* shebang:

shell = "ipython"

(name (py-buffer-name-prepare shell sepchar)
shell = "/Library/Frameworks/EPD64.framework/Versions/7.2/bin/ipython"
sepchar = "Enthought Python Distribution -- www.enthought.com/"

Returns "*Ipython*"

(temp (Make-temp-name shell)) sets temp to "ipython60832qrt"

(expand-file-name temp py-temp-directory) returns "var/folders/zf/bgjm4tvs3wv_6q7_6z3b2nx00000gn/T/ipython60832qrt.py"

So the problems with setting the temp file name/path are definitely in this section of code somewhere.