pinard/Pymacs

Unable to call a python method imported as a handle

Opened this issue · 0 comments

The Pymacs 0.25 manual has the following snippet in Section 3.4.2

(pymacs-exec "import re")
(setq matcher (pymacs-eval "re.compile('PATTERN').match"))
(pymacs-call matcher "PATTERN123")

In Emacs24.2 on Ubuntu 12.04 (32-bit) with Python 2.7.3, the first two statements execute fine, but the third one throws the following error:

pymacs-report-error: Python: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Pymacs.py", line 268, in loop
    value = eval(text)
  File "<string>", line 1
    (lambda (&rest arguments) (pymacs-apply (quote (pymacs-python . 5)) arguments))(".")

I don't know a lot of Elisp, but the lambda statement itself evaluates without any errors with C-x C-e, so I don't know what's going wrong. Please help?