Python 3 incompatibilities

Issue #8 resolved
Anonymous created an issue


I'm trying to run poole on archlinux, but when I'm starting the process with : {{{


$ --init }}} I have this error : {{{


File "/usr/bin/poole/", line 399 exec stmt in macros.copy() ^ SyntaxError: invalid syntax }}}

I've installed the poole directory in /usr/bin/ and update my path like that : {{{


$ export PATH=$PATH:/usr/bin/poole }}}

My site directory is in my dropbox in my home folder.

Python v3.2.2-2 is installed on my computer as well as python-markdown.

Any idea about this error ?

Thanks in advance,


Comments (6)

  1. Oben Sonne repo owner
    • changed status to open

    The problem here is that exec isn't a keyword anymore in Python 3 but a plain function. In other words, the exec ... syntax works only until Python 2.7.

    I try to make this Python 3 friendly ASAP. In the meantime you might run poole with a Python 2.7 installation.

  2. Oben Sonne repo owner

    Python 2/3 hack for the exec statement/function

    See for changes with regard to `exec`. The problem here is that we cannot use the function syntax in Poole already for Python 2.x since we need a qualified exec, and thus we need the `in` syntax which causes a syntax error in Py3.

    This workaround uses `execfile` in Py2 (which, as a function, does not cause syntax errors in Py3) and the `exec` function from the builtins in Py3.

    References issue 8.


  3. Log in to comment