call static function from extension module - syntaxerror

Todd goldfita at
Fri Dec 23 06:41:27 CET 2005


I'm working right from the example here to make a basic extenstion

I can load my module into python and dir shows my function.  But I get
a syntax error if I try to access it.

>>> ast_man.exec
  File "<stdin>", line 1
SyntaxError: invalid syntax

However, I can get at it using getattr.  I tried compiling myself and
using setup.  My method is defined as

static PyMethodDef ast_man_methods[] = {
    {"exec",exec,METH_VARARGS,"Execute Asterisk commands."},

What might be my problem??


More information about the Python-list mailing list