summaryrefslogtreecommitdiff
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2004-06-03 21:27:15 +0000
committerJack Jansen <jack.jansen@cwi.nl>2004-06-03 21:27:15 +0000
commit568d90aeca7acc77ca71786b5c71a205d61c85aa (patch)
tree62be62355899ffa62c39fe8ddb7d2d7e23fda8c6 /Mac
parente597602a2ad6b5763f9f3b771854d03b308775ed (diff)
downloadcpython-568d90aeca7acc77ca71786b5c71a205d61c85aa.tar.gz
- Fix for #862941: "run with commandline python" crashed. Fixed.
- Prefer to use pythonw (if it exists) for "run with commandline python".
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Tools/IDE/PyEdit.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py
index 6826c65866..e21fda54cf 100644
--- a/Mac/Tools/IDE/PyEdit.py
+++ b/Mac/Tools/IDE/PyEdit.py
@@ -540,14 +540,17 @@ class Editor(W.Window):
def _run_with_cl_interpreter(self):
import Terminal
- interp_path = os.path.join(sys.exec_prefix, "bin", "python")
+ interp_path = os.path.join(sys.exec_prefix,
+ "Resources", "Python.app", "Contents", "MacOS", "Python")
+ if not os.path.exists(interp_path):
+ interp_path = os.path.join(sys.exec_prefix, "bin", "python")
file_path = self.path
if not os.path.exists(interp_path):
# This "can happen" if we are running IDE under MacPython-OS9.
raise W.AlertError, "Can't find command-line Python"
cmd = '"%s" "%s" ; exit' % (interp_path, file_path)
t = Terminal.Terminal()
- t.do_script(with_command=cmd)
+ t.do_script(cmd)
def runselection(self):
self._runselection()