~/Documents/elisp/test/Pymacs/helloworld.py Enregistrez le fichier suivant sous
~/Documents/elisp/test/Pymacs/helloworld.py
# -*- coding: utf-8 -*-
from Pymacs import lisp
def hello():
lisp.insert("Hello from Python!")
def hello2(l):
return l[0]+"pypy123"
def hello3(l):
return [l[0]+"12pypy123",l[1]+"bbb"]
Faites ce qui suit sur elisp
pymacs-test-load.el
(eval-after-load "pymacs"
'(add-to-list 'pymacs-load-path "~/Documents/elisp/test/Pymacs/"))
(pymacs-load "helloworld")
scratch Etc
pymacs-test-do.el
(helloworld-hello)
(helloworld-hello2 "aaa")
;;return "apypy123"
(helloworld-hello3 (list "aaa" "kkk"))
;;return ("aaa12pypy123" "kkkbbb")
Recommended Posts