From: daniel <idnael@gmail.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: pymacs
Date: Mon, 10 Jun 2013 11:54:01 +0100 [thread overview]
Message-ID: <CABX3oxahBOQ2J5ARobrDCwKKPQBZOR5nHRywLCV0MKNtvGraPQ@mail.gmail.com> (raw)
In-Reply-To: <877gi27j5h.fsf@ericabrahamsen.net>
2013/6/10 Eric Abrahamsen <eric@ericabrahamsen.net>
>
> What else do you need to know?
>
>
In Ubuntu it is easy to install Pymacs because it is on the standard
repository.
The question is about passing values from python and elisp and the opposite
way.
# A function that receives a elisp variable name and returns it's value:
from pymacs import lisp
def tvar(n):
return lisp[n].value()
AND IN ELISP:
(pymacs-load "pymacs_teste")
(setq PTEST "string")
(pymacs-teste-tvar "PTEST") ;; returns "string" Ok!
(setq PTEST (list 1 2 3))
(pymacs-teste-tvar "PTEST") ;; returns (lambda (&rest arguments)
(pymacs-apply (quote (pymacs-python . 4543)) arguments))
When python calls lisp[n].value() it returns a kind of wrapper which works
well inside python. But if I return it back to elisp, it doesn't work.
If I do instead
def tvar(n):
return list( lisp[n].value() )
It works perfectly.
But I don't know what to do if PTEST contains a elisp symbol.
next prev parent reply other threads:[~2013-06-10 10:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 19:35 pymacs daniel
2013-06-09 22:19 ` pymacs andrea crotti
2013-06-09 22:37 ` pymacs daniel
2013-06-10 3:13 ` pymacs Eric Abrahamsen
2013-06-10 10:54 ` daniel [this message]
2013-06-10 13:12 ` pymacs daniel
2013-06-10 13:37 ` pymacs Eric Abrahamsen
2013-06-10 17:50 ` pymacs daniel
2013-06-10 18:03 ` pymacs Andreas Röhler
2013-06-10 22:43 ` pymacs Kyle Machulis
2013-06-16 20:38 ` pymacs daniel
2013-06-10 5:20 ` pymacs Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABX3oxahBOQ2J5ARobrDCwKKPQBZOR5nHRywLCV0MKNtvGraPQ@mail.gmail.com \
--to=idnael@gmail.com \
--cc=eric@ericabrahamsen.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.