starting a python program from within xemacs

Stephen J. Turnbull stephen at xemacs.org
Mon Mar 25 23:36:22 EST 2002


>>>>> "Marco" == Marco Herrn <herrn at gmx.net> writes:

    Marco> sorry if this is the wrong newsgroup to ask, but I tried in
    Marco> comp.emacs.xemacs and nobody could help me, probably
    Marco> because too few people there code in python :-)

Oh, I think it's unlikely that that is the problem.  For starters you
waited less than 16 hours for an answer.  But most likely because you
omitted important information:

    Marco> Because I use curses, a C-c C-c doesn't work because the
    Marco> xemacs output window isn't capable of using curses.

You didn't mention C-c C-c, so obviously people were led to answer a
different question.

(defun marco/py-execute-in-xterm ()
  (interactive)
  (shell-command (concat "xterm -e 'python "
                         (buffer-file-name)
                         "' &")))

(define-key py-mode-map [(control c) c] #'marco/py-execute-in-xterm)

probably sorta kinda does what you want.  If you want to override the
normal C-c C-c, change the second element of the vector to (control c).

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
              Don't ask how you can "do" free software business;
              ask what your business can "do for" free software.



More information about the Python-list mailing list