I am writing a comint-mode for a python script.
The script can be launched with :
/usr/bin/python3.3 tool-name arg0
I am using comint-mode since this call will ask in the prompt some information before running.
If I create :
(defun create-app ()
"create application by using python tool"
(interactive)
(progn
(setq default-directory "/path/to/tool")
(setq buffer (get-buffer-create "*buffer_name*"))
(apply 'make-comint-in-buffer "tool" buffer "/usr/bin/python3.3" nil nil)
)
)
everything works fine and python is launched but if I write :
(defun create-app ()
"create application by using python tool"
(interactive)
(progn
(setq default-directory "/path/to/tool")
(setq buffer (get-buffer-create "*buffer_name*"))
(apply 'make-comint-in-buffer "tool" buffer "/usr/bin/python3.3 tool-name arg0" nil nil)
)
)
the buffer tells me that it cannot exec program "/usr/bin/python3.3 tool-name arg0"
Does anyone have an idea (with or without comint) how I can launch this python process and have the script asking some information before launch ?
The docstring of
make-comint-in-buffer
(C-hfmake-comint-in-buffer
RET) states the followingSo the correct way to use the function is to have the only name of the program as a string and pass the arguments to be passed to the program, as additional arguments to
make-comint-in-buffer
as follows