~/Documents/elisp/test/Pymacs/helloworld.py Save the following file as
~/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"]
Do the following on elisp
pymacs-test-load.el
(eval-after-load "pymacs"
'(add-to-list 'pymacs-load-path "~/Documents/elisp/test/Pymacs/"))
(pymacs-load "helloworld")
scratch And so on
pymacs-test-do.el
(helloworld-hello)
(helloworld-hello2 "aaa")
;;return "apypy123"
(helloworld-hello3 (list "aaa" "kkk"))
;;return ("aaa12pypy123" "kkkbbb")
Recommended Posts